This plugin will help you to optimize your wordpress database.
This is a great plugin and it works with pretty much every version of WP. I've been using it on many sites for over a year now and I've never had a problem. It hasn't been updated for almost two years now but there is no need for the update either.
Thanks for sharing.