Mysql Index Optimization

Source: Internet
Author: User

Indexes after a single-table range query are invalidated

Double-table left and right connections to make an index use each other

Three tables using small result sets to drive large table results, first optimize the parentheses inside the SQL, to ensure that the join is driven on the table on the field is indexed

Index invalidation (Common Cause)

full-time matching best left  -hand rule if it is a composite index, make sure that the leftmost index column must have  no, full table scan  * in use ! = or <> when the index cannot be used, it causes a full table scan  is NULL  is NOT NULL also cannot use index like percent plus right like to start with wildcards '%SDF ', index invalidation, full table scan string without single quotes, index invalidation less with or, index invalidation when connected with him

  

  

  

  

    

Mysql Index Optimization

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.