Changeset: 3b282d41857a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/3b282d41857a
Modified Files:
        clients/mapiclient/mhelp.c
        sql/ChangeLog
Branch: less_explain_info
Log Message:

Rewrite mclient help for EXPLAIN. Add changelog entry.


diffs (64 lines):

diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c
--- a/clients/mapiclient/mhelp.c
+++ b/clients/mapiclient/mhelp.c
@@ -409,10 +409,17 @@ SQLhelp sqlhelp1[] = {
         "EXECUTE { intnr | ** } '(' [ value [, ...] ] ')'",
         NULL,
         "See also 
https://www.monetdb.org/documentation/user-guide/sql-manual/data-manipulation/prepare-statement/"},
-       {"EXPLAIN PHYSICAL",
-        "Give MAL execution plan for the SQL statement",
-        "EXPLAIN statement",
+       {"EXPLAIN",
+        "Display logical or physical execution plan for the SQL statement.",
+        "EXPLAIN [BEFORE|AFTER] [step] [SHOW DETAILS] statement\n"
+        "step [UNNEST|REWRITE|PHYSICAL]",
         NULL,
+        "Plain EXPLAIN defaults to logical execution plan.\n"
+        "Use UNNEST|REWRITE|PHYSICAL to specify compilation step to show.\n"
+        "Use BEFORE|AFTER to specify moment of compilation step\n"
+        "to output. The default is AFTER.\n"
+        "SHOW DETAILS displays column properties, rewriter number of changes\n"
+        "and time spent.\n"
         "See also 
https://www.monetdb.org/documentation/admin-guide/debugging-features/explain-sql-stmt/"},
        {"EXTRACT",
         "Built-in function",
@@ -446,11 +453,6 @@ SQLhelp sqlhelp1[] = {
         "[ WITH cte_list ] MERGE INTO qname [ [AS] ident ] USING table_ref [ 
[AS] ident ] ON search_condition merge_list",
         "cte_list,table_ref,search_condition,merge_list",
         "See also: 
https://www.monetdb.org/documentation/user-guide/blog-archive/merge-statements/"},
-       {"EXPLAIN",
-        "Give relational execution plan for the SQL statement",
-        "EXPLAIN statement",
-        NULL,
-        "See also 
https://www.monetdb.org/documentation/admin-guide/debugging-features/plan-sql-stmt/"},
        {"PREPARE",
         "Prepare a SQL DML statement with optional question-mark parameter 
markers",
         "PREPARE statement",
@@ -551,7 +553,7 @@ SQLhelp sqlhelp1[] = {
         "joined_table,join_type",
         "See also 
https://www.monetdb.org/documentation/user-guide/sql-manual/data-manipulation/table-expressions/"},
        {"TRACE",
-        "Give execution trace for the SQL statement",
+        "Trace engine execution for the SQL statement. Output can be accessed 
via tracelog view.",
         "TRACE statement",
         NULL,
         "See also 
https://www.monetdb.org/documentation/admin-guide/debugging-features/trace-sql-stmt/"},
diff --git a/sql/ChangeLog b/sql/ChangeLog
--- a/sql/ChangeLog
+++ b/sql/ChangeLog
@@ -1,6 +1,15 @@
 # ChangeLog file for sql
 # This file is updated with Maddlog
 
+* Fri Oct  3 2025 Lucas Pereira <[email protected]>
+- EXPLAIN now supports a BEFORE/AFTER UNNEST/REWRITE/PHYSICAL clause
+  to indicate which phase of query compilation to show.  A plain
+  EXPLAIN is equivalent to EXPLAIN BEFORE PHYSICAL, which is what PLAN
+  used to do. The old EXPLAIN is now EXPLAIN PHYSICAL. SHOW DETAILS
+  includes more information about properties, rewriters number of
+  changes and time spent.
+- The PLAN keyword has been removed.
+
 * Tue Sep 16 2025 Sjoerd Mullender <[email protected]>
 - The TRACE prefix for SQL queries now no longer produces two result sets.
   Before, the first result set was the result of the query, and the
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to