Skip to content

Instantly share code, notes, and snippets.

@sabate
Created June 7, 2011 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sabate/1012879 to your computer and use it in GitHub Desktop.
Save sabate/1012879 to your computer and use it in GitHub Desktop.
MySQL Explain
mysql> EXPLAIN SELECT ID, Name, Population FROM City ORDER BY Name DESC;
+----+-------------+-------+------+---------------+------+---------+------+------+----------------+
| id | select_type | table | type | possible_keys | key | key_len |
ref | rows | Extra |
+----+-------------+-------+------+---------------+------+---------+------+------+----------------+
| 1 | SIMPLE | City | ALL | NULL | NULL | NULL |
NULL | 4079 | Using filesort |
+----+-------------+-------+------+---------------+------+---------+------+------+----------------+
1 row in set (0.00 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment