Hi I am new to databases. I am working on huge database and trying to clear up the mess. I want to start by finding the top ten tables that take up highest memory in the whole database. I cannot go by finding memory of each table since there are too many tables. I need the top 10 or 20 tables that take up the maximum space. Any help would be much appreciated. Thank you.
Share
MyISAM only takes up memory for its indexes
To find the top 10 MyISAM tables that can use the most memory in the worst case try this:
InnoDB takes up memory for its data and indexes
To find the top 10 InnoDB tables that can use the most memory in the worst case try this:
Here is another display of the top 50 tables by size descending
If you are interested, I have queries that give you the whole story on the MySQL Instance
This query shows you the amount of disk space taken by Storage Engine in GB
This query shows you the amount of disk space taken by Database in GB
This query shows you the amount of disk space taken by Database by Storage Engine in GB
The three previous queries I posted has a common feature : the subquery
(SELECT 3 pw)(SELECT 0 pw), report is in Bytes(SELECT 1 pw), report is in KiloBytes(SELECT 2 pw), report is in MegaBytes(SELECT 3 pw), report is in GigaBytes(SELECT 4 pw), report is in TeraBytes(SELECT 5 pw), report is in PetaBytes (If you need this, post that result please !!!)