I've been struggling with a very slow mysql database for several weeks, I had tried almost everything! I quadrupled memory, bought a new server, tried to optimize queries, created indexes if any were missing where appropriate.... Still nothing would increase the speed. After speaking to a DBA, he said without looking at anything, his best guess would be that I need to rebuild indexes. So, I went to all my tables and did:
And sure enough, the server is now lightening fast!
I just thought I would share this for anyone experiencing similar "unknown" slowness, and I'll follow-up with a question, Has anyone else experienced the same thing and found the same solution? if so, how often do you repair?