EXPLAIN¶
EXPLAIN
returns a static query plan, which can be used to debug query plans.
To see an actively running query or statement, use SHOW_NODE_INFO instead.
See also SHOW_NODE_INFO, SHOW_SERVER_STATUS.
Permissions¶
The role must have the SELECT
permissions for any tables referenced by the query.
Syntax¶
explain_statement ::=
SELECT EXPLAIN(query_stmt)
;
Parameters¶
Parameter |
Description |
---|---|
|
The select query to generate the plan for. |
Notes¶
Use dollar-quoting to escape the query text