MySQL 5.6 introduced a new feature called extended secondary
keys. We get a lot of questions about it and find that most
of them come from a few incorrect assumption. In this post I’ll
try to get rid of the confusion once and for all. Famous last
words… here goes:
Q1: Do I need to do anything
to enable extended secondary keys?No, nothing at all. It’s on
by default and I can’t see any sensible reason why you would want
to disable it. However, it is possible to disable it by tuning
the optimizer_switch: SET
optimizer_switch=’use_index_extensions={on|off}’.
Q2: Does extended secondary keys only work with InnoDB?
No, it should work with any storage engine that uses the primary key columns as reference to the row, which means most storage engines with clustered primary keys. I say “should” because it requires a minimum of work from the storage engine provider; it must …
[Read more]