Loading large tables with Unique Keys

This subject resurrects the trick shown in this thread for loading or altering large tables.

Alter table performance with MyISAM

I am struggling with some random cases where the REPAIR TABLE process is showing “Repair with keycache” instead of “Repair by sorting”. In my latest test, on try # 2 it is “Repair by Sorting” which I believe is desired. Note that I use the “QUICK” option of the REPAIR TABLE command.

What would cause this to go into “Repair with keycache”?

Thanks,

johndz

Unique indexes are always rebuilt with the key cache, not by sort.