EXPLAIN [EXTENDED] SELECT select_options
Or:
EXPLAIN tbl_name
The EXPLAIN statement can be used
either as a way to obtain information about how MySQL executes a
statement, or as a synonym for
DESCRIBE:
When you precede a SELECT
statement with the keyword
EXPLAIN, MySQL displays
information from the optimizer about the query execution plan.
That is, MySQL explains how it would process the statement,
including information about how tables are joined and in which
order. EXPLAIN
EXTENDED can be used to provide additional
information.
For information about using
EXPLAIN and
EXPLAIN
EXTENDED to obtain query execution plan information,
see Section 7.2.1, “Optimizing Queries with EXPLAIN”.
EXPLAIN
is synonymous
with tbl_nameDESCRIBE
or tbl_nameSHOW
COLUMNS FROM .
For information about tbl_nameDESCRIBE
and SHOW COLUMNS, see
Section 12.8.1, “DESCRIBE Syntax”, and
Section 12.7.5.5, “SHOW COLUMNS Syntax”.

User Comments
Add your own comment.