there is a index key limit
- single key length : 767 bytes
- total key length : 3072 bytes
for single key limit:
- innodb_large_prefix = on
- innodb_file_format = Barracuda
- Table Row-Format: ROW_FORMAT=DYNAMIC
the total key length limit is hard check.
if innoDB+utf8, it works use someCol to create index when large-prefix on (3*1000=3000)
if innoDB+utf8mb4, it not work as large than 3072(4*1000 = 4000)
for index base on large colums, mysql offer prefix index, as only use a part of the colum value as index.
- prefix length should easy to compare
- can not be used in order by/group by