The key part of my blog is the Scarlet Letter point.
MYSQL EXPLAIN
Is the MySQL execution Plan Finder, in a nutshell: tell you how MySQL retrieves data. It's telling you, but it's another matter if you can read it.
Ancestors planted trees, posterity: http://www.cnblogs.com/ggjucheng/archive/2012/11/11/2765237.html
The above link to the MySQL explain explanation is very easy to understand, if you do not understand this, do not look at my.
Add some additional notes:
1. Type field: Some places are translated into "link type", "type of access", I think it is more appropriate to understand the type of access to the table, that is, how to access the table data (using the index or all method).
2, when the type is index, with the all type of the performance of the table is slightly higher, it is indexed in order to scan, the advantage is that the index is sorted out, the disadvantage is to follow the order of the table data access. "Kinky Trick One": The index access type is best used with order by [index field] LIMIT XXX; the indexed field is an already ordered feature, with limit restrictions (no scanning of the full table index, avoiding filesort and temporary). You can index the fields you want to sort on.
3. When type is ref or REF_EQ mode, the ref field may be: a) Table.column b) const
MYSQL explain play says