MySQL slow query optimization of the explain of the column meaning

Source: Internet
Author: User

Mysql>ExplainSelectCustomer_id,first_name,last_name fromcustomer;+----+-------------+----------+------+---------------+------+---------+------+------+-------+|Id|Select_type| Table |Type|Possible_keys| Key |Key_len|Ref|Rows|Extra|+----+-------------+----------+------+---------------+------+---------+------+------+-------+| 1 |Simple|Customer|  All | NULL | NULL | NULL | NULL | 599 | NULL |+----+-------------+----------+------+---------------+------+---------+------+------+-------+1Rowinch Set(0.00Sec

Returns the meaning of each column
Extra column needs to be aware of the return value
Using Filesort: When you see this, the query needs to be optimized.
Using temporary When you see this, you need to optimize,

http://www.imooc.com/video/3710

Notes

Mysql>ExplainSelect Max(payment_date) frompayment\g*************************** 1. Row***************************ID:1Select_type:simpleTable: Payment Type: AllPossible_keys:NULL          Key:NULLKey_len:NULLRef:NULLrows:16086Extra:NULL1Rowinch Set(0.00sec) MySQL> 

MySQL slow query optimization of the explain of the column meaning

Related Article

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.