MySQL Forums
Forum List  »  InnoDB

InnoDB B+ tree index - duplicate values
Posted by: Vikas Kumar
Date: July 05, 2016 02:55AM

How are duplicate keys handled in InnoDB's implementation of B+ tree for it's indexes.

For example, if there is a table with 1 million rows having a column with cardinality of 10. If we create an index on this column, how will the resulting B+ tree would look like?

Will it just have 10 keys and the value of each key is the list of primary keys which belong to that key (if yes, in what structure? Linked list?) or will it have 1M keys (if yes, then B+ tree would have to be handled differently)?

P.S.: This is for my understanding of how InnoDB works. I'm aware that an index on a column with such low cardinality is probably not a good idea.

Options: ReplyQuote

Written By
InnoDB B+ tree index - duplicate values
July 05, 2016 02:55AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.