FAQTs – Knowledge Base – View Entry – How do you estimate the size of existing MySQL database?
How do you estimate the size of existing MySQL database?
Well, since MySQL keeps all its databases as directories, and all its tables as simple files in those directories, you can just change into the directory that contains your MySQL databases (/var/db/mysql under FreeBSD ports) and go ‘du -s databasename’ and get the _exact_ size of a database.
ISAM 을 쓰면 파일크기 = 테이블크기 이다.
그러나 Inno DB에서는 오라클과 유사하게 nickel-and-dime 으로 하지 않고, 한꺼번에 왕창 왕창씩 파일 용량을 할당하고 내부적으로 다시 테이블에게 나눠준다. (예측임.. 귀찮아서 메뉴얼 자세히 안읽고 대략 보아하니 그렇군.. 하고 알게됨)
결과적으로 Inno DB 를 쓰게되면 테이블 크기 측정은 어떻게 하는지 모르겠다. 자료가 워낙 없어서. 덕분에 MyISAM 인가하는 MySQL 의 개선된 ISAM으로 테이블에대한 저장 엔진을 바꿔서 테이블 크기를 측정했음 ;;