정확한 테이블 사이즈를 확인하기 위해서는
먼저 analyze 구문을 통해 통계 정보를 재작성하고 user_tables 테이블의
num_rows 와 avg_row_len 컬럼을 이용하여 사이즈를 확인한다.
--테이블 단위로 analyze
analyze table 테이블명 compute statistics;
--계정 단위로 analyze
exec dbms_utility.analyze_schema('SCOTT','COMPUTE');
--테이블 사이즈 확인
select
table_name,
num_rows,
num_rows * avg_row_len,
round((num_rows * avg_row_len/1024/1024),2) "SIZE(Mb)",
round((num_rows * avg_row_len/1024/1024/1024),2) "SIZE(Gb)",
last_analyzed
from user_tables;
'::: DB ::: > Oracle' 카테고리의 다른 글
히스토그램 생성 방법 (0) | 2010.12.07 |
---|---|
Top 10 Reasons for poor Oracle performance (0) | 2010.12.07 |
Windows7 (64bit) 에 Oracle 10g Client 설치하기 (0) | 2010.10.21 |
[OTN] LTOM 사용자 가이드 (0) | 2010.10.13 |
SYS_CONTEXT - 세션 정보 확인 함수 (0) | 2010.10.06 |