Skip to content

Instantly share code, notes, and snippets.

@igniteflow
Created May 21, 2014 17:29
Show Gist options
  • Save igniteflow/d6a67d5aa15f9b1d4297 to your computer and use it in GitHub Desktop.
Save igniteflow/d6a67d5aa15f9b1d4297 to your computer and use it in GitHub Desktop.
MySQL: Show how much space tables are using in descending order
SELECT `TABLE_SCHEMA`, `TABLE_NAME`, `TABLE_ROWS`, `DATA_LENGTH`, `INDEX_LENGTH`, `DATA_FREE` FROM `TABLES` WHERE `TABLE_SCHEMA` LIKE "my_database" ORDER BY `DATA_LENGTH` DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment