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;
Created
June 23, 2020 21:17
-
-
Save andreyuhai/0dbeb108a8e58f7b16dd8b83e7073914 to your computer and use it in GitHub Desktop.
Get the size of a database
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment