Economicalhost · Knowledge Base
Knowledge Base › Databases › How to Optimise a MySQL Database
Databases

How to Optimise a MySQL Database

Over time, databases accumulate overhead that slows queries and wastes space. Optimising reclaims it — a quick, safe maintenance task.

Step-by-step

  1. Back up the database first via export.
  2. Open Databases → phpMyAdmin and select your database.
  3. Look at the Overhead column in the table list — tables with overhead benefit from optimising.
  4. Tick the tables (or Check All).
  5. Choose "Optimize table" from the "With selected" dropdown at the bottom.
  6. Confirm completion — overhead drops to zero and queries run leaner. Repeat occasionally as part of maintenance.

💡 Good to know

  • WordPress sites benefit from clearing post revisions and spam comments before optimising.
  • A leaner database is one part of speeding up your site.
  • Schedule periodic optimisation if your site writes a lot of data.