Created
April 27, 2012 15:50
-
-
Save olivM/2510319 to your computer and use it in GitHub Desktop.
mysql cli : get all tables size
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 AS 'Database', TABLE_NAME AS 'Table', | |
CONCAT(ROUND(((DATA_LENGTH INDEX_LENGTH - DATA_FREE) / 1024 / 1024),2)," Mb") AS Size FROM INFORMATION_SCHEMA.TABLES ORDER BY Size ASC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment