The Btree is simply a collection of one or more data pages, called nodes. The non-leaf nodes help in reaching the leaf nodes. Depending on the height of the tree, reaching leaf nodes might require traversing through multiple levels of non-leaf nodes.
In Innodb, the leaf nodes are nothing but index pages. The index pages contain index records.
For non-clustered (secondary) indexes, index record contains an index key value and a pointer to the data page containing the corresponding data record.
For clustered indexes (primary key) , the index pages are nothing but data pages.
(reference book: pro mysql, chapter 2 (index concepts))
No comments:
Post a Comment