terça-feira, 22 de novembro de 2011

Listar o Tamanho em disco ocupado por CADA database do mysql

SELECT table_schema "Data Base Name", sum( data_length + index_length) / 1024 / 1024
"Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema

+--------------------+----------------------+
| Data Base Name | Data Base Size in MB |
+--------------------+----------------------+
| billing | 1431.56089401 |
| billing20100110 | 195.48437500 |
| calendar | 0.04969788 |
| chamado | 2.79687500 |
| configurador | 3.54687500 |
| dms | 1.37670231 |
| dotproject | 52.40728092 |
| fntworkflow | 3.75861359 |
| information_schema | 0.00390625 |
| monitoracao | 0.23437500 |
| mysql | 0.51768875 |
| openfire | 0.32731628 |
| sac | 46.89778519 |
| sac_backup | 4.39062500 |
| timesheet | 0.76562500 |
| timesheet_bkp | 0.53125000 |
| webcalendar | 0.06479740 |
| webhtbdb | 0.01000595 |
| workflow | 2061.82812500 |
+--------------------+----------------------+