Last active
October 31, 2017 17:05
-
-
Save franc3000/9abace01a01e8189d7f49ca8fada9702 to your computer and use it in GitHub Desktop.
db table sizes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
table_schema, | |
table_name, | |
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB`, | |
sum(table_rows) Rows | |
FROM information_schema.TABLES | |
WHERE table_schema='paretodb' | |
GROUP BY 1,2 | |
ORDER BY (data_length + index_length) DESC | |
LIMIT 100 | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment