January 2019
Intermediate to advanced
286 pages
7h 41m
English
The role of the EXPLAIN tool is to display the running cost before executing your DML queries; it's like asking your vendor for a price estimate for goods before you buy. In other words, MySQL uses EXPLAIN to explain how it will execute your DML, including the table structure. Please note that since MySQL 5.7, the DML (Select, Update, Delete, Insert, and Replace) commands are allowed in EXPLAIN—that's why we will not just mention SELECT in our explanations.
The syntax and possible parameters are as follows:
{EXPLAIN | DESCRIBE | DESC} tbl_name [col_name | wild] {EXPLAIN | DESCRIBE | DESC} [explain_type] {explainable_stmt | FOR CONNECTION connection_id} explain_type: { | FORMAT = format_name }