MySQL 4.x and later support disabling of indices to speed up the import of large database dumps by adding a proprietary ALTER TABLE statement before and after INSERTing the data. This should dramatically improve the import performance, from their Reference Manual:

ALTER TABLE ... DISABLE KEYS tells MySQL to stop updating non-unique indexes. ALTER TABLE ... ENABLE KEYS then should be used to re-create missing indexes. MySQL does this with a special algorithm that is much faster than inserting keys one by one, so disabling keys before performing bulk insert operations should give a considerable speedup.

Comments

sun’s picture

Status: Needs review » Fixed

Committed to all branches.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.