Created
June 14, 2021 12:03
-
-
Save vinaysyadav/38d0e7b805452a18d9854cfd6c833828 to your computer and use it in GitHub Desktop.
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
// Get sizes of all databases on the server. | |
SELECT table_schema "database name", sum( data_length + index_length ) / 1024 / 1024 "database size in MB", sum( data_free )/ 1024 / 1024 "free space in MB" FROM information_schema.TABLES GROUP BY table_schema order by "database size in MB" DESC limit 500 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment