repair by sorting?

mysqldump is disabling indexes, inserting the records, and re-enabling the indexes. This means it affects the entire table, including the many more records I expect are there based on the time.

Add --skip-disable-keys to the arguments for mysqldump and that should stop happening.


The mysqldump command will do three things to a table during the reload:

  1. DISABLE KEYS;
  2. multiple INSERTs...
  3. ENABLE KEYS;

When you disable keys, it actually disables non-unique indexes.

Primary Keys and Unique Keys are loaded immediately.

Once ENABLE KEYS is started, all non-unique indexes are then build using 'Repair By Sorting';

If you bypass DISABLE KEYS and ENABLE KEYS, you will make things much worse, because the Primary Keys, Unique Keys, and Non-Unique Keys are built row by row and that's internally a messier operation for MySQL.

Since so little data is being added, doing --skip-disable-keys as 'Autocracy' suggested is both wise and concise.

BTW this only applies to MyISAM tables. InnoDB ignores DISABLE KEYS and ENABLE KEYS.