1. 개별 테이블 조회


SELECT 

    table_name AS `Table`, 

    round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` 

FROM information_schema.TABLES 

WHERE table_schema = "DB명"

    AND table_name = "테이블명";



2. 테이블 전체 조회


해당 디비 선택 후,


SELECT 

     table_schema as `Database`, 

     table_name AS `Table`, 

     round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` 

FROM information_schema.TABLES 

ORDER BY (data_length + index_length) DESC;




블로그 이미지

엘로드넷

,