Created
April 23, 2013 19:22
-
-
Save dnozay/5446579 to your computer and use it in GitHub Desktop.
get mysql table sizes
based on http://stackoverflow.com/questions/9620198
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
# get mysql table sizes | |
# based on http://stackoverflow.com/questions/9620198 | |
SELECT | |
concat(table_schema, '.', table_name) AS "Table", | |
table_rows AS "number of rows", | |
round((data_length / 1024 / 1024), 2) "Data in MB", | |
round((index_length / 1024 / 1024), 2) "Indexes in MB" | |
FROM information_schema.TABLES; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment