Skip to content

Instantly share code, notes, and snippets.

@laixintao
Created August 2, 2019 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laixintao/7e9cf5c58c3711f18198490572924e67 to your computer and use it in GitHub Desktop.
Save laixintao/7e9cf5c58c3711f18198490572924e67 to your computer and use it in GitHub Desktop.
SELECT table_schema "DB Name",
ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB"
FROM information_schema.tables
GROUP BY table_schema;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment