Search code examples
mysqldata-structuresindexinginnodbb-tree

innodb data structure


I believe I understand how the INNODB structures the table (by using clustered btree indexes=PK and the leafs containing the rows themselves). Secondary indexes using the same principle (btree clustered index=secondary index) and the leaf contains the PK that is used as a pointer(that is the reason why second index lookup may be need).

http://www.chenyajun.com/wp-content/uploads/2008/12/3-9.jpg so sorting is based on the index in INNODB.

But I really cannot understand how the clustering btree index principle is used to sort and store physically the covering/composite indexes in INNODB.


Solution

  • this article might prove of interest :)

    http://www.xaprb.com/blog/2006/07/04/how-to-exploit-mysql-index-optimizations/