Categories
MySQL

ALTER TABLE .. ORDER BY

Today a customer mentioned reordering a MyISAM table to get rid of fragmentation. I asked them to clarify what they meant by reordering, assuming that they were running an OPTIMIZE or a NULL ALTER TABLE operation and they said that they use ALTER TABLE t1 ORDER BY f1, f2, f3,..etc;

via Things you manage to miss – ALTER TABLE .. ORDER BY – The Soapbox.