After Chris' great post, What's faster than ALTER, I got thinking about
REPAIR. REPAIR TABLE can be slow, but may seem necessary if your
table is corrupt.
A little background:
MyISAM tables are prone to corruption if they are receiving
updates/inserts/deletes/etc and your server crashes. Doing a
REPAIR TABLE can generally "fix" them, but it can take time. The
larger the table, the longer it takes. How long? Well, a
rough approximation that I use is:
Size of table | Approximate time |
KBs | N seconds |
MBs | N minutes |
GBs | N hours |
So a …