Log into your cPanel account.
In the
Databasessection, click on thephpMyAdminicon.
In the left side-bar, click on
Expandbutton to expand the database like “example”
Under your cPanel username, you can see a list of all databases. Select the appropriate database which you want to optimize.

Scroll down and mark
Check Allthen click on the drop-down option and selectOptimize Tables.
Your table is now successfully optimized.