Generally there are two ways webmasters use for optimization database tables, some do it via phpMyAdmin which works from your webserver or your web hosting account and the other way is using a database optimization plugin which is more easy and user friendly way. There are hundreds of database optimization plugins available in WordPress plugin repository which confuses the new WordPress users.
Working with database plugins is unlike to other simple PHP hack plugins because database contains all your website’s text work like your website’s posts, pages, content in custom post types, post revisions, authors, login information, theme and plugin settings and even information about attachments and media files.
Before choosing any database plugin one must make sure whether it is designed by a serious developer(s) who updates the plugin when any new versions of WordPress arrives because choosing any wrong database plugin can disturb your whole website. Hence, here we have selected two good plugins for managing and optimizing your database.
WP-DBManager is a popular that enables you to optimize, repair, backup and restore your database. Another plugin, WP-Optimize, is a cleanup and optimization tool which doesn’t require any PhpMyAdmin for optimizing the database tables and lets you remove post revisions, comments in the spam queue, un-approved comments and trash stuff.