MySQL 데이터베이스 별 용량 알아내기

지지온 2012.06.15 17:13:41 출처:

SELECT table_schema "Database", SUM(data_length + index_length) / 1024 / 1024 "Size" FROM information_schema.TABLES GROUP BY table_schema;

결과가 다음처럼 잘 보이게 된다.

mysql> SELECT table_schema "Database", SUM(data_length + index_length) / 1024 / 1024 "Size" FROM information_schema.TABLES GROUP BY table_schema;

+--------------------+--------------+

| Database           | Size         |

+--------------------+--------------+

| information_schema |   0.00781250 |

| mysql              |   0.60144138 |

| phpmyadmin         | 598.74023438 |

+--------------------+--------------+

3 rows in set (0.38 sec)