radondb / radon

RadonDB is an open source, cloud-native MySQL database for building global, scalable cloud services

Home Page:https://radondb.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[feature] complete explain statement

hustjieke opened this issue · comments

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:

  1. For explain_type in 8.0, extend and partitions are abandoned, for forward compatibility, we'll parse normally.
  2. 8.0 add new feature explain analyze
  3. TABLE statement and REPLACE statement will be supported in the future.

Differently with MySQL, the explain will output radon plan but not MySQL currently.