Skip to content

Instantly share code, notes, and snippets.

@joshuabergeron
Last active December 22, 2015 06:19
Show Gist options
  • Save joshuabergeron/6430600 to your computer and use it in GitHub Desktop.
Save joshuabergeron/6430600 to your computer and use it in GitHub Desktop.
Returns size of tables in megabytes for provided DATABASE.
SELECT table_name AS "Tables", round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" FROM information_schema.TABLES WHERE table_schema = "DATABASE";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment