Up to 16 columns.
Create table test (
F1 int,
F2 int,
F3 int,
F4 int,
F5 int,
F6 int,
F7 int,
F8 int,
F9 int,
F10 int,
F11 int,
F12 int,
F13 int,
F14 int,
F15 int,
F16 int,
F17 int
);
Create index idx_test_16 on test (f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16 );
Create index idx_test_17 on test (f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17 );
The running result is as follows:
Mysql> create table test (
-> F1 int,
-> F2 int,
-> F3 int,
-> F4 int,
-> F5 int,
-> F6 int,
-> F7 int,
-> F8 int,
-> F9 int,
-> F10 int,
-> F11 int,
-> F12 int,
-> F13 int,
-> F14 int,
-> F15 int,
-> F16 int,
-> F17 int
-> );
Query OK, 0 rows affected (0.06 sec)
Mysql>
Mysql> create index idx_test_16 on test (f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16 );
Query OK, 0 rows affected (0.02 sec)
Records: 0 Duplicates: 0 Warnings: 0
Mysql> create index idx_test_17 on test (f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17 );
ERROR 1070 (42000): Too primary key parts specified; max 16 parts allowed
Mysql>