'table'에 해당되는 글 1건

MySQL 의 database 와 table 의 size 를 알아내는 방법
 
DB_NAME 에 사이즈를 알고 싶은 database 를 넣으면 모든 테이블의 사이즈가 출력됨

SELECT TABLE_NAME AS "Tables",
                     round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"
FROM information_schema.TABLES
WHERE table_schema = "DB_NAME"
ORDER BY (data_length + index_length) DESC;

 

반응형
블로그 이미지

조이풀 라이프

Lift is short, enjoy the life

,