EXPLAIN [EXTENDED] SELECT select_options
Or:
EXPLAIN tbl_name
The EXPLAIN statement can be used
either as a synonym for DESCRIBE or
as a way to obtain information about how MySQL executes a
SELECT statement:
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
SELECT, including information
about how tables are joined and in which order. As of MySQL
4.1, EXPLAIN
EXTENDED can be used to provide additional
information.
For information on how to use
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 .
tbl_name
For a description of the
DESCRIBE and
SHOW COLUMNS statements, see
Section 12.7.1, “DESCRIBE Syntax”, and
Section 12.4.5.5, “SHOW COLUMNS Syntax”.

User Comments
Add your own comment.