# Loading large tables with Unique Keys

**URL:** <https://forums.percona.com/t/loading-large-tables-with-unique-keys/963>\
**Category:** Other MySQL® Questions\
**Created:** [October 15, 2008, 3:29pm UTC](https://forums.percona.com/t/loading-large-tables-with-unique-keys/963 "2008-10-15T15:29:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johndz](https://avatars.discourse-cdn.com/v4/letter/j/b77776/32.png) [@johndz](https://forums.percona.com/u/johndz)\
**Post date:** [October 15, 2008, 3:29pm UTC](https://forums.percona.com/t/loading-large-tables-with-unique-keys/963/1 "2008-10-15T15:29:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [December 25, 2009, 10:47am UTC](https://forums.percona.com/t/loading-large-tables-with-unique-keys/963/2 "2009-12-25T10:47:35Z")

</div>

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