mysql-innodb data storage method and index

innodb index storage

B tree.

 

innodb index type

Clustered index (primary index), leaf nodes contain primary key columns and other rows and columns;

The secondary index, the leaf node contains the indexed column and the primary key column.

1. Therefore, if a query is not a covered index (the query column contains only the index column and the primary key column), it will first search from the secondary index, and then search in the primary index according to the primary key column.

2. The index is stored in B-tree order.

 

innodb data storage

Data storage is actually a clustered index (primary index).

 

Innodb index usage scenarios and unused scenarios

 

Guess you like

Origin www.cnblogs.com/DengGao/p/12734764.html