Reputation: 17
The MySQL InnoDB engine is based on a clustered index, all records and index data are stored in the index. So I am wondering where the secondary index is stored? In a different b+tree?
Please help!
Upvotes: 1
Views: 71
Reputation: 142306
The PRIMARY KEY
(which is 'clustered') is stored with the data in one BTree. Each secondary index is stored in another BTree. For more details, search this stackoverflow for my answers to similar questions.
Upvotes: 1