v.25.6Improvement
EXPLAIN SYNTAX now uses a new analyzer
EXPLAIN SYNTAXnow uses a new analyzer. It returns AST built from the query tree. Added optionquery_tree_passesto control the number of passes to executed before converting query tree to the AST. #74536 (Vladimir Cherkasov).
Why it matters
The update improves the internal query analysis by reconstructing the AST from the query tree, allowing better insight into query structure. The addition of thequery_tree_passes option enables users to control how many optimization passes are executed before the AST conversion, offering more precise diagnostics and flexibility in understanding query transformations.How to use it
UseEXPLAIN SYNTAX on your query as usual. To customize the number of optimization passes before AST generation, set the query_tree_passes option with the desired number, for example:EXPLAIN SYNTAX SETTINGS query_tree_passes = 3
SELECT * FROM tableThis controls how many passes the analyzer performs before outputting the AST.