How many B/B+ tree will be created if I add a multi column index?

280 views Asked by At

In mysql with InnoDB storage engine, When create a multi column index, such as (a, b, c), how many B+ tree/B tree will be create?

Explain the detail if you can.

1

There are 1 answers

0
akuzminsky On BEST ANSWER

InnoDB creates B+trees only. There is one tree for PRIMARY index. For every secondary index InnoDB creates one B+tee no matter how many columns are in the key.

See my slides with more examples https://twindb.com/efficient-use-of-indexes-in-mysql/