데이터베이스별 용량 확인
SELECT table_schema "Database Name",
SUM(data_length + index_length) / 1024 / 1024 "Size(MB)"
FROM information_schema.TABLES
GROUP BY table_schema;
테이블별 용량 확인
SELECT
table_schema,'.',table_name),
round(data_length/(102410241024),2) DATA,
round(index_length/(102410241024),2 idx,
round((data_length+index_length)/(102410241024),2 total_size,
round(index_length/data_length,2) idxfrac
FROM information_schema.TABLES
WHERE table_rows is not null;