'MySQL 팁'에 해당하는 글 1건

1. 모든 데이터베이스의 크기 조회
SELECT table_schema "DB_name", SUM( data_length + index_length) / 1024 / 1024 
"Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema ;

2. 특정 데이터베이스의 테이블 별 데이터 건수, 사이즈, 인덱스 크기 조회
SELECT table_name, table_rows, data_length, index_length, 
ROUND(((data_length + index_length) / 1024 / 1024),2) "Size in MB"
FROM information_schema.TABLES WHERE table_schema = "DB_name";

WRITTEN BY
하이런

,