keywords: myisam_max_extra_sort_file_size myisam_max_sort_file_size alter altering mysqls
text: MySQL and ALTER TABLE Guilty as Charged \\For the last few days I've been using MySQLs ALTER and REPAIR table\functionality and its caused tons of countless problems and a great deal of lost\sleep.\\The first problem I noticed was that for large tables ALTER TABLE was taking\hours!  Lets say you have a 30G table.  Good luck altering it as the default\MySQL configuration will probably take 100 or more hours.\\In MySQLs defense there are a number of variables you can use to increase the\performance of an ALTER but the problem is that the two major ones\(myisam_max_extra_sort_file_size, and myisam_max_sort_file_size) can't be set at\runtime (during an ALTER). If these are set too low MySQL will revert to a\"Repair with keycache" strate ...\\