Some of our customers have experienced that our control panel and the size metric in phpMyAdmin can differ quite a lot from time to time. Some times showing a size 4-5x larger in our control panel compared to phpMyAdmin. This has a simple explanation.
Actual disk space used and the calculated metric in phpMyAdmin is two different things
The disk space metrics shown in our control panel is actual space used on disk, compared to the phpMyAdmin metric which calculated the size of the actual data and indexes in the database. If you have a high volume of writes/deletes the actual size on disk can grow even though phpMyAdmin is quite steady.
Solved my optimising the tables
This problem has a simple solution, and it is to run
optimize table on all tables in the database.
Warning! Do not run optimize table when you have high traffic on your site
Solution for WordPress
If you have a WordPress this is solved easily by running WP CLI command
wp db optimize (https://developer.wordpress.org/cli/commands/db/optimize/)
Not running WordPress? Here is a step by step guide for non-WordPress:
- Log in to the database using phpMyAdmin at a time of low traffic on your site.
- Choose the database and click to see it’s structure
- Select all tables
- In the dropdown select field at the bottom of the structure table choose
Optimize tableand wait for it to finish
- Wait a up to 10 minutes for the control panel to receive a disk space quota update and verify that this solved the problem
Give us your feedback on this article
Did this help you?
We have launched in the UK! 🇬🇧
Servebolt Cloud UK is now available to all clients. Our London data center will ensure that all clients with their majority of visitors in the UK experience extremely fast websites!