SQL EXPLAIN: Index-related columns

These relate to the usage of indexes:

  1.  possible_keys
    • Which indexes were considered?
  2. key
    • Which indexes did the optimizer choose?
  3.  key_len
    • How many bytes of the index will be used?
SQL EXPLAIN: The “type” column

The “type” column indicates how MySQL will access rows
From worse to better:

  • ALL
  • index
  • range
  • ref
  • eq_ref
  • const
  • system
  • NULL