Summary description:
- id: select identifier
- select_type: indicates the type of query.
- table: the table of the output result set
- partitions: matching partitions
- type: indicates the connection type of the table
- possible_keys: indicates the index that may be used when querying
- key: indicates the actual index used
- key_len: the length of the index field
- ref: column and index comparison
- rows: the number of rows scanned (estimated number of rows)
- filtered: Percentage of rows filtered by table conditions
- Extra: description and explanation of the implementation
note:
• explain will not tell you information about triggers, stored procedures, or the impact of user-defined functions on queries.
• explain does not consider various caches.
• explain cannot display the optimization work that MySQL has done during query execution.
• Some statistics are estimates.
Yes , it is not an exact value. • explain can only explain SELECT operations, and other operations should be rewritten as SELECT and then view the execution plan.
Original: A picture to thoroughly understand MySQL's explain