Slide 44
Slide 44 text
©2023 Percona | Confidential
Multi column indexes
create table multi (a int, b int, c int);
insert into multi values (10,11,12),(20,21,22),(30,31,32),(40,41,42);
create index multi_abc_idx on multi(a,b,c);
44
For multi column indexes, traditionally you would put the column with
the highest cardinality (fewest in number of values) in the left most
column, the second highest in the next column, and so forth.