denrepo

MySQLStorage

Largest tables

Top 20 user tables with data, index and reclaimable free space.

Not yet verified. How scripts are tested

b-my-tables.sql
1SELECT table_schema, table_name, engine,2       table_rows AS est_rows,3       ROUND(data_length / 1024 / 1024, 1) AS data_mb,4       ROUND(index_length / 1024 / 1024, 1) AS index_mb,5       ROUND(data_free / 1024 / 1024, 1) AS free_mb6FROM information_schema.tables7WHERE table_schema NOT IN ('mysql', 'sys', 'performance_schema', 'information_schema')8ORDER BY data_length + index_length DESC9LIMIT 20;

Paste it into your query tool.

Open in denrepo

More MySQL scripts: Storage