MySQL - MyISAM tables and large index (.myi) files
Submitted by David Goodwin on Tue, 22/04/2008 - 12:34.
This is just a quick note, incase it helps someone else in the future.
It seems that MySQL server, when using MyISAM tables doesn't truncate the index file when you run "ALTER TABLE x DISABLE KEYS", so when running "ALTER TABLE x ENABLE KEYS" you end up with an MyISAM index file (xxxx.myi) which keeps growing. In my case this hit 90gb on a customer's server.
Ways to fix this :
- Upgrade to MySQL 5.0.52 (apparently ... see
http://bugs.mysql.com/bug.php?id=4692 ) - Run "optimize table xxxx"
- Run "repair table xxxx quick use_frm"
- Nuke it from orbit, it's the only way to be sure.
Technorati Tags:
Post new comment