Do you automatically optimize MySQL tables?
As time passes, a MySQL database can get “fragmented” by adding and deleting records. This slows down the database.
To avoid this problem, we automatically run MySQL’s OPTIMIZE TABLE command once a month on database tables that are smaller than 50 MB.
Optimizing a table blocks (delays) INSERTs and UPDATEs for a few seconds, so we do it late on a Saturday night to avoid potentially slowing down your scripts at a busy time of the day.
We also don’t automatically optimize tables larger than 50 MB, because doing so might delay scripts for more than a few seconds. If you have tables larger than 50 MB that often change, you should occasionally optimize the table yourself to avoid slowdowns.
