[Reprint] The meaning of using BTREE in MySQL index

Source: Internet
Author: User
Tags mysql index

Indexes are implemented in the storage engine, so the indexes for each storage engine are not necessarily identical, and each storage engine does not necessarily support all index types.

Defines the maximum number of indexes and the maximum index length per table based on the storage engine. All storage engines support at least 16 indexes per table with a total index length of at least 256 bytes.

Most storage engines have a higher limit. There are two types of indexes stored in MySQL: Btree and hash, which are related to the storage engine of the table;

The MyISAM and InnoDB storage engines support only btree indexes; memory and heap storage engines can support hash and btree indexes

B-tree indexes are a way to access and find files (called records or key values) in a database. The b-tree algorithm reduces the intermediate process that is experienced when locating records, thus speeding up the access speed.

A typical example of a b-tree is the node in the hard disk. Compared with memory, hard disk spends a lot of time to access a data element, which is the mechanical part of the hard disk can not read and write data much faster than the memory of pure electronic media. Compared to a two-tuple tree with two branches of a node, B-tree uses nodes of multiple branches (called subtrees) to reduce the number of nodes that are experienced when acquiring records, thus saving access time.

This article is from the "Linux career" blog, so be sure to keep this source http://lvzili.blog.51cto.com/1995527/564260

[Reprint] The meaning of using BTREE in MySQL index

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.