Skip to content

Instantly share code, notes, and snippets.

@zushane
Last active August 29, 2015 13:55
Show Gist options
  • Save zushane/8696684 to your computer and use it in GitHub Desktop.
Save zushane/8696684 to your computer and use it in GitHub Desktop.
A short MySQL snippet to display table sizes of the mentioned DATABASE_NAME in a fine tabular format.
SELECT table_name, engine, table_rows, data_length, ROUND(((data_length+index_length)/1024/1024),0) "MB"
FROM information_schema.tables
WHERE table_schema = 'DATABASE_NAME'
ORDER BY data_length;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment