2017년 3월 2일 목요일

[MySQL] 데이터베이스 테이블별 용량확인



SELECT
    table_name,
    table_rows,
    round(data_length/(1024*1024),2) as 'DATA_SIZE(MB)',
    round(index_length/(1024*1024),2) as 'INDEX_SIZE(MB)'
FROM information_schema.TABLES
where table_schema = 'DB Name'
GROUP BY table_name
ORDER BY data_length DESC
LIMIT 10;

댓글 없음:

댓글 쓰기