v.21.1New Features
EXPLAIN AST Now Supports Non-SELECT Queries
EXPLAIN ASTnow support queries other thenSELECT. #18136 (taiyang-li).
Why it matters
Previously,EXPLAIN AST was limited to only SELECT queries, restricting users from inspecting the Abstract Syntax Tree (AST) of other query types. This feature expands the capability to analyze and understand the syntax structure of a broader range of queries, enhancing debugging and query optimization.How to use it
Use theEXPLAIN AST statement followed by any query type (not only SELECT). For example:EXPLAIN AST INSERT INTO table_name VALUES (1, 'value');This will output the AST for the specified query.