WordPress is powered by PHP and depends on MySQL database; in fact, all the content, including the website settings, are stored in it. When your WordPress site is visited, the web server will query the database to retrieve all the necessary information to display. However, over time, the speed required for querying the database will increase due to the number of operations such as insert, updates, and delete of data entries.
From time to time it is a good idea to do a little housekeeping with your WordPress installation. MySQL databases don’t clean themselves, it will help to free up disk space and keep your database running smoothly.
As a start, try optimizing the overheads on your database as reported in phpMyAdmin. When this occurs, you need to run Optimize Table manually via WP Optimize plugin or phpMyAdmin
Warning: backup the WordPress database before making major optimization efforts
1. WP Optimize Plugin
If you’re not familiar with phpMyAdmin, then a WordPress plugin may be a safer option for you. Those plugins will allow you to select the tables you wish to optimize and will also show you the total size of your database and how much of it can be reduced after you have completed the optimization.
WP-Optimize: This is a database cleanup and optimization tool.It does all of this without the use of phpMyAdmin (a program used to handle the administration of your MySQL servers). It will show you which tables are already optimized and the ones that need to be optimized. Select the option: Optimize database tables. Then click the Process button below the option
2. phpMyAdmin
If you have access to phpMyAdmin, simply login to your phpMyAdmin and select the option 1: Check tables having overhead . Then at the side in the drop down box, select 2: Optimize Table, this will take care of all of your tables at once.