I have a table with an indexed varchar(256) column.
For faster bulk insert, I disabled keys, insert more than 10 million entries, and then re-enable the keys after insertion is done.
Surprisingly, the enable/disable keys took no time:
mysql> alter table xxx disable keys; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> alter table xxx enable keys; Query OK, 0 rows affected, 1 warning (0.00 sec)
How do I ensure that enable/disable keys were working properly?
As you guessed, InnoDB does not support DISABLE/ENABLE KEYS. The warning you got is:
As you can see here.
To see the warning yourself, run
SHOW WARNINGS;after you run theALTER.