MySQL Explain performance Analysis keywords

Source: Internet
Author: User

EXPLAIN output format
Select_type
Table
Type
Possible_keys
Key
Key_len
Rows
Extra

MySQL provides a EXPLAIN command that SELECT parses statements and outputs SELECT details of execution to be optimized by the developer.
The EXPLAIN command is very simple to use, with EXPLAIN in front of the SELECT statement, for example:

EXPLAIN SELECT * from user_info WHERE  id < 300;


The meanings of the columns are as follows:

    • The identifier for the Id:select query. Each SELECT is automatically assigned a unique identifier.
    • The type of the Select_type:select query.
    • Table: Which tables are queried
    • Partitions: Matching partitions
    • Type:join type
    • Possible_keys: The index that may be selected in this query
    • Key: The exact index used in this query.
    • Ref: Which field or constant is used together with key
    • Rows: Shows how many rows this query has scanned altogether. This is an estimate.
    • Filtered: Represents the percentage of data filtered by this query condition
    • Extra: Additional Information

MySQL Explain performance Analysis keywords

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.