Mysql notes:

Source: Internet
Author: User

1: You can view information_schema.index_statistics to view the usage information for the index. You can also use the Pt-index-usage tool to analyze the logs and combine explain to analyze the indexes used.

2:innodb locks the row when it accesses the row, and the index reduces the number of rows InnoDB accesses. thereby reducing the number of locks. But this only works if the InnoDB is able to transition all unneeded rows in the storage engine layer.

If the index has no way to filter out invalid rows, the MySQL server layer can apply a WHERE clause after INNODB retrieves the data and returns it to the server layer. There is no way to avoid locking the line.

InnoDB has locked these lines and will be released at the right time. A later version of 5.1 will not be placed until the server layer finishes executing the where statement, and the previous version will be released when the transaction completes. This can also be from

Explain see extra:using where.

Mysql notes:

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.