select owner,table_name,
NUM_ROWS,
BLOCKS*AAA/1024/1024 "Size M",
EMPTY_BLOCKS,
LAST_ANALYZED
from dba_tables
where table_name='XXX'; Here: AAA is the value of db_block_size ;
XXX is the table name you want to check
NUM_ROWS,
BLOCKS*AAA/1024/1024 "Size M",
EMPTY_BLOCKS,
LAST_ANALYZED
from dba_tables
where table_name='XXX'; Here: AAA is the value of db_block_size ;
XXX is the table name you want to check
analyze table
或者
dbms_stats.gather_table_stats
select table_name name, num_rows, blocks, empty_blocks, avg_space, chain_cnt, avg_row_len
,sample_size, last_analyzed
, user_stats, global_stats
from user_tables where table_name =' XXX '
或者
select * from dba_segments where owner='xxx' and segment_name='xxx'
看oracle分了多少个盘区给你!
2.select table_name,blocks*block_size/1024||'MB' from user_tables
where table_name='XXXX'
block_size为块的大小,可以在SQL>show parameters中的db_block_size 看到