Last active
May 15, 2017 18:25
-
-
Save RomuloOliveira/3eb5baef25ebd09f96f7f18efe7d0e28 to your computer and use it in GitHub Desktop.
Show table size in MBs
This file contains hidden or 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
# source: http://stackoverflow.com/a/9620273 | |
SELECT | |
table_name AS `Table`, | |
round(((data_length + index_length) / 1024 / 1024), 2) as size | |
FROM information_schema.TABLES | |
WHERE table_schema = "$DB_NAME" | |
ORDER BY size DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment