1. What is an index?An index is a data structure that the storage engine uses to quickly find records. 2. What data structures does the index have?
By comparing once, the search range is reduced by half. The data in MySQL is not an ordered sequence.
The time complexity of a balanced binary search tree is O(logN). The query speed is indeed very fast, but the cost of maintaining a balanced binary tree is also very high. Typically, one or more left and right rotations are required to achieve balance after an insertion or update.
B+ tree is a variant of B tree, which evolved from B tree and index sequential access method (B tree is rarely used in real life). 3. Why does Innodb use B+ tree as index?
4. Index classificationClassification from the storage structure: BTree index, Hash index, full-text index Classification from the application: primary key index, unique index, composite index From the perspective of physical storage: clustered index and non-clustered index (auxiliary index) Let's talk about what is a clustered index and what is a non-clustered index:
A B+ tree is constructed according to the primary key of each table, and the row record data of the entire table is stored in the leaf node. The leaf nodes of the clustered index are also called data pages, and each data page is linked through a doubly linked list. Clustered indexes are very fast for sorted and range searches of the primary key.
In addition to storing the index column, the pointer to the leaf node is also stored. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: A brief discussion on the application of Html web page table structured markup
>>: Example of compiling LNMP in Docker container
How to change the MySQL database directory locati...
React Lifecycle Two pictures to help you understa...
1. Basic steps 1: Install yarn add vue-i18n Creat...
Some people say that IE9 is Microsoft's secon...
This article shares the specific code of Vue intr...
1. What is CSS Animations is a proposed module fo...
<br />The page uses UTF8 encoding, and the h...
Code <div class="test"> <div&g...
Copy code The code is as follows: <!DOCTYPE ht...
Overlay network analysis Built-in cross-host netw...
To use standard CSS3 to achieve the shadow effect...
As a useful terminal emulator, Xshell is often us...
First, we will introduce how (1) MySQL 5.7 has a ...
1 System Installation Steps OS Version:1804 Image...
The concept of mysql stored procedure: A set of S...