EXPLAIN
The explain query has two very different forms. The first,
EXPLAIN tbl_nameis
equivalent to DESCRIBE tbl_name or SHOW COLUMNS
FROM tbl_name.The second format,
EXPLAIN select_satementwhere select_statement can be any valid SELECT query, will produce
an explanation of how MySQL would determine the results of the SELECT statement.
This query is useful for finding out where indexes will help speed up your SELECT queries,
and also to determine if MySQL is performing multi-table queries in optimal
order. See the STRAIGHT_JOIN option of the SELECT query
in "SELECT" for information on how to override the MySQL optimizer,
and control this order manually. See the MySQL
Reference Manual for complete information on how to interpret the
results of an EXPLAIN query.