[feature] complete explain statement
hustjieke opened this issue · comments
hustjieke commented
In MySQL 8.0 syntax:
{EXPLAIN | DESCRIBE | DESC}
tbl_name [col_name | wild]
{EXPLAIN | DESCRIBE | DESC}
[explain_type]
{explainable_stmt | FOR CONNECTION connection_id}
{EXPLAIN | DESCRIBE | DESC} ANALYZE [FORMAT = TREE] select_statement
explain_type: {
FORMAT = format_name
}
format_name: {
TRADITIONAL
| JSON
| TREE
}
explainable_stmt: {
SELECT statement
| TABLE statement
| DELETE statement
| INSERT statement
| REPLACE statement
| UPDATE statement
}
Precautions:
- For explain_type in 8.0,
extend
andpartitions
are abandoned, for forward compatibility, we'll parse normally. - 8.0 add new feature
explain analyze
- TABLE statement and REPLACE statement will be supported in the future.
Differently with MySQL, the explain will output radon plan but not MySQL currently.