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
First, let me explain the application method. The...
Mysql supports 3 types of lock structures Table-l...
1. To build a PPTP VPN, you need to open port 172...
Preface Every good habit is a treasure. This arti...
You can often see articles about CSS drawing, suc...
This article example shares the specific code of ...
For example, users who need screen reading softwar...
The code can be further streamlined, but due to t...
Preface: The most commonly used architecture of M...
This example takes the installation of Python 3.8...
This article uses an example to describe the inte...
The BGCOLOR attribute can be used to set the back...
Abstract: Analysis of two MySQL SQL statement loc...
Recommended Docker learning materials: https://ww...
1. INSERT INTO SELECT statement The statement for...