Created
February 3, 2014 20:19
-
-
Save thewinterwind/8791553 to your computer and use it in GitHub Desktop.
View details on MySQL tables
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 count(*) tables, | |
concat(round(sum(table_rows)/1000000,2),'M') rows, | |
concat(round(sum(data_length)/(1024*1024*1024),2),'G') data, | |
concat(round(sum(index_length)/(1024*1024*1024),2),'G') idx, | |
concat(round(sum(data_length+index_length)/(1024*1024*1024),2),'G') total_size, | |
round(sum(index_length)/sum(data_length),2) idxfrac | |
FROM information_schema.TABLES; | |
+--------+----------+---------+--------+------------+---------+ | |
| tables | rows | data | idx | total_size | idxfrac | | |
+--------+----------+---------+--------+------------+---------+ | |
| 1538 | 1623.91M | 314.00G | 36.86G | 350.85G | 0.12 | | |
+--------+----------+---------+--------+------------+---------+ | |
1 row in set (52.56 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment