Best ways to optimize a database?

I think one of my big sites needs some tuning. A mysqldump of the database runs around 140Mb, and one of the things I'd been reading about was clearing out commentsmeta table of all the unneeded Akismet cruft.

This site has content going back to 2005, and it has just under 15k articles, about 41k comments, and it says that it's trapped about 6.5 million spam comments over it's lifetime.... the comments table is about 20Mb, and the commentsmeta table is about 19Mb

If Akismet is really storing any of that spam data, is there a quick, safe way to clean that out? I just don't think my comments or commentsmeta tables should be that big.

I have also been using the plugin Relevanssi as a replacement for WordPress search. While it works well on fuzzy searches, the tables it creates are nearly 400Mb, and judging from the plugin author's responses to other complaints about large table sizes over the past couple years, this isn't something that's going to be fixed.

And no, I'm not sold on using Custom Google Search plugin just yet... one thing at a time :slight_smile: