Article Directory
1. Index overview
The concept of index
indexed demo
Advantages and disadvantages of indexing
2. Index structure
The support of the index structure in different storage engines, the index we usually refer to, unless otherwise specified, is the index organized by the B+ tree structure.
2.1 Binary tree and red-black tree index structure
Data structure visualization website: https://www.cs.usfca.edu/~galles/visualization/Algorithms.html
Red-black tree is essentially a binary tree
2.2 B-Tree index structure
B-Tree visualization evolution website: https://www.cs.usfca.edu/~galles/visualization/BTree.html
2.3 Introduction to B+Tree
- The sub-leaf nodes mainly serve as indexes, and the leaf nodes are mainly used to store data.
- All data will appear in the leaf nodes.
- The leaf nodes form a singly linked list.
B+Tree demo website: https://www.cs.usfca.edu/~galles/visualization/BPlusTree.html
Why does the InnoDB storage engine choose to use the B+Tree index structure? ?
2.4 Hash Index Introduction