I had a bit of a problem earlier on with my server. Exim, the bit that handles email, decided to eat up resources, which caused the Virtuozzo operating system to kick into action and start killing off processes that were eating up too much RAM. This left my server with just Apache and MySQL running.
I’m quite surprised that WordPress doesn’t come with any built in database table optimization code. I can understand the whole premise of wanting to make sure that WordPress is just the basic blog tool, which you can then improve with plugins, but surely something this easy would be a good idea to incorporate?
I’ve been keeping an eye on my WordPress database and whilst it certainly doesn’t perform badly, i have noticed that regular usage does cause some tables to create overhead, which can in the long run affect performance.
Not one to mess with underlying code, i created this little script that i run as a cron job every week. This helps keep WordPress running smoothly and stops database congestion. (click the continue reading link to see the code)