MySQL creates high-performance indexes

Source: Internet
Author: User

I. Type of index

B-tree Index:

B-tree usually means that later values are stored sequentially, and each leaf page is the same distance from the root.

B-tree indexed columns are stored sequentially, so it's good to look for range data.

The B-tree index is valid for queries of the following types :

Full-value match, match leftmost prefix, match column prefix, match range value, exact match to a column, and range match one column, and only the query that accesses the index

B-tree Index Limits:

If you do not start looking in the leftmost column of the index, you just cannot use the index.

Columns in the index cannot be skipped.

If a range query for a column in a query, all columns just to the right of it cannot use an index-optimized query.

Hash Index:

Hash indexes are based on hash table implementations, and only queries that accurately match all columns of the index are valid.

MySQL creates high-performance indexes

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.