Get the App
SLTechnology News&Howtos  ›  Development  › 

Example Analysis of InnoDB Primary key Index Tree and Secondary Index Tree

Shulou Source: shulou.com Published: 2022-06-01 06:15:15 10月04日 Update

This article will explain in detail about InnoDB primary index tree and secondary index tree example analysis, Xiaobian think quite practical, so share to you as a reference, I hope you can have some harvest after reading this article.

We are discussing the InnoDB storage engine here, where data and indexes are stored in the same file student.ibd

Scenario 1: Primary key index tree

uid is the primary key, no index is added to other fields

select * from student;

If this is the query, this means the whole table search, traversing the leaf node list from left to right, accessing from small to large

select * from student where uid

Tags: Indexes fields queries search analysis sorting statements aids data multiple situations more conditions articles results storage federation examples that is information Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi MariaDB MySQL OPPO Reno Microsoft