Skip to content

Instantly share code, notes, and snippets.

@jrsouth
Created August 29, 2013 09:50
Show Gist options
  • Save jrsouth/6376201 to your computer and use it in GitHub Desktop.
Save jrsouth/6376201 to your computer and use it in GitHub Desktop.
SQL Snippets
SELECT table_schema "DB Name",
ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "Size in MB",
COUNT(table_name) "Tables"
FROM information_schema.tables
WHERE table_schema = "eximstats"
GROUP BY table_schema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment