在執行此query前
1.須先確定db_block_size大小
select value from v$parameter where name='db_block_size'
Oracle有關V$Parameter的說明
2.update所以資料表的統計值
ANALYZE TABLE TABLENAME COMPUTE STATISTICS
Oracle有關Analyze的說明
oracle有關all_tables的說明
select OWNER,TABLE_NAME,NUM_ROWS,BLOCKS,BLOCKS*8096 as blockusebyte,AVG_ROW_LEN,AVG_ROW_LEN*NUM_ROWS as rowusebyte
from all_tables
where owner<>'SYS' and owner<>'SYSTEM'
and blocks is not null
order by blocks desc
沒有留言:
張貼留言