Created
June 17, 2013 02:55
-
-
Save eloipoch/5794382 to your computer and use it in GitHub Desktop.
Scripts about MySql administration
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_name AS 'Tables', | |
ROUND((data_length / 1024 / 1024), 2) "Data in Mb", | |
ROUND((index_length / 1024 / 1024), 2) "Index in Mb", | |
ROUND(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" | |
FROM information_schema.TABLES | |
WHERE table_schema = :database | |
ORDER BY ROUND(data_length + index_length) DESC; |
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_name AS 'Tables', | |
ROUND(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" | |
FROM information_schema.TABLES | |
WHERE table_schema = :database | |
ORDER BY ROUND(data_length + index_length) DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment