--
-- extents.sql
--
set pagesize 66
set echo off
set feedback off
set verify off
ttitle 'Table Extents List'
spool extents.lst
col col0 heading 'Owner' format a10
col col1 heading 'Segment_name' format a20
col col2 heading 'Segment_Type' format a13
col col3 heading 'Ext Cnt' format 999
col col4 heading 'Size(KB)' format 999,999
col col5 heading 'RowCnt' format 9,999,999
col col6 heading 'Avg_Row_Len' format 9,999,999
col col7 heading 'TableSpace' format a15
col col8 heading 'PCT FREE' format 999
col col9 heading 'PCT USED' format 999
col col10 heading 'PCT INCREASE' format 999
select e.owner col0,
e.segment_name col1,
e.segment_type col2,
count(e.segment_name) col3,
sum(e.bytes) / 1024 col4,
t.num_rows col5,
t.avg_row_len col6,
t.tablespace_name col7,
t.pct_free col8,
t.pct_used col9,
t.pct_increase col10
from extents e, dba_tablees t
where e.segment_name = t.table_name
and e.owner not in ('SYSTEM', 'SYS')
and e.segment_type = 'TABLE'
group by e.owner, e.segment_name, e.segment_type,t.num_rows,t.avg_row_len,t.tablespace_name,t.pct_free,t.pct_used,t.pct_increase
having count(e.segment_name) >= 1
/
spool off
exit
Previous Article : Table에 걸린 DeadLock 확인 SQL...
Next Article : Disk I/O tuning...
[출처] 오라클자바커뮤니티 - http://ojc.asia/bbs/board.php?bo_table=oracleTip&wr_id=27
댓글 없음:
댓글 쓰기