- Baron Schwartz presents
- only works for SELECTs
- nobody dares admit if they've never seen EXPLAIN
- MySQL actually executes the query
- at each JOIN, instead of executing the query, it fills the EXPLAIN result set
- everything is a JOIN (even SELECT 1)
- Columns in EXPLAIN
- id: which SELECT the row belongs to
- select_type
- simple
- subquery
- derived
- union
- union result
table: the table accessed or its aliastype:possible_keys: which indexes looked useful to the optimizerkey: which index(es) the optimizer chosekey_len: the number of bytes of the index MySQL will useref: which columns/constants from preceding tables are used for lookups in the index named in the key columnrows: estimated number of rows to readextra… Read the rest of this article »