Luckily optimizing a MySQL database in phpMyAdmin is easy. In most cases, you won’t need to do this unless you have large databases that are constantly being changed. But if you do need to optimize your database follow these steps:
Log into phpMyAdmin which you can find in your cPanel
Choose the database by clicking on it in the left menu
Make sure you’ve clicked on the database and not one of the tables
Under the list of tables in your database you’ll see a “Check All” checkbox, tick this.
You’ll then see a “With selected:” drop down, click it then choose “Optimize table”.