Created
November 27, 2024 22:34
-
-
Save Justintime50/648f45befdeab4ef3c78b11363cc5020 to your computer and use it in GitHub Desktop.
Check the size of your database
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 `Table`, | |
table_rows AS `Records`, | |
ROUND((data_length + index_length) / 1024 / 1024, 2) AS `Size (MB)` | |
FROM | |
information_schema.tables | |
WHERE | |
table_schema = 'your_db_table' | |
ORDER BY | |
`Size (MB)` DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment