MYSQL explain play says

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.