Introduction to the types of indexes in MySQL

Source: Internet
Author: User

The first thing to understand is that the index is implemented at the storage Engine (storage) level, not at the server level. Not all storage engines support the type of index.

1, B-tree

The most common type of index, his mind is that all values (indexed columns) are ordered, each leaf node is equal to the root node, so it is suitable for finding a range of data, and can directly support the sort (order by) support InnoDB and MyISAM, when indexing multiple columns, The order of the columns is particularly important.

2. Hash index

Based on the hash table, only accurate lookups are supported, range lookups are not supported, and sorting is not supported.

3. Spatial index

4. Full-text Full-text index

It is primarily used to find keywords in text, not directly compared to the values in the index. Can be used in conjunction with B_tree, the two do not conflict. Full-text is used in conjunction with the match against operation and is generally not in the where or like statement.

Introduction to the types of indexes in MySQL

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.