Differences between revisions 5 and 6
Revision 5 as of 2016-03-17 02:48:15
Size: 2389
Editor: localhost
Comment:
Revision 6 as of 2016-03-17 02:50:31
Size: 2502
Editor: localhost
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
<<TableOfContents()>>
Line 3: Line 4:
= show tablespace usages status = = Regular Manual Check =
=
= show tablespace usages status ==
Line 26: Line 28:
= Shared Pool Size hit rate = == Shared Pool Size hit ratio ==
{{{
Line 30: Line 33:
}}}
Line 31: Line 35:
= 数据字典命中率: == data dictionary hit ratio ==
{{{
Line 34: Line 39:
}}}
Line 35: Line 41:
锁竞争: == 锁竞争 ==
{{{
Line 42: Line 49:
}}}
Line 43: Line 51:
排序命中率: == 排序命中率 ==
{{{
Line 49: Line 58:
}}}
Line 50: Line 60:
数据缓冲区命中率 == 数据缓冲区命中率 ==
{{{

Regular Manual Check

show tablespace usages status

set linesize 300
SELECT upper(f.tablespace_name) "tablespace_name",
       d.Tot_grootte_Mb "tablespace(M)",
       d.Tot_grootte_Mb - f.total_bytes "used(M)",
       round((d.Tot_grootte_Mb - f.total_bytes) / d.Tot_grootte_Mb * 100,2) "use%",
       f.total_bytes "free_space(M)",
       round(f.total_bytes / d.Tot_grootte_Mb * 100,2) "free%"
 FROM      
    (SELECT tablespace_name,
            round(SUM(bytes)/(1024*1024),2) total_bytes,
            round(MAX(bytes)/(1024*1024),2) max_bytes
      FROM sys.dba_free_space
     GROUP BY tablespace_name) f,
    (SELECT dd.tablespace_name, round(SUM(dd.bytes)/(1024*1024),2) Tot_grootte_Mb
      FROM   sys.dba_data_files dd
      GROUP BY dd.tablespace_name) d
WHERE d.tablespace_name = f.tablespace_name    
ORDER BY 4 DESC
/

Shared Pool Size hit ratio

select round((sum(gets)-sum(reloads))/sum(gets)*100,1) "libiary cache hit ratio %"
from v$librarycache where namespace
in ('SQL AREA','TABLE/PROCEDURE','BODY','TRIGGER');

data dictionary hit ratio

select round((1-sum(getmisses)/sum(gets))*100,1) "data dictionary hit ratio %"
from v$rowcache;

锁竞争

select  substr(ln.name,1,25) Name, 
        l.gets, l.misses, 
        100*(l.misses/l.gets) "% Ratio (STAY UNDER 1%)" 
from v$latch l, v$latchname ln 
where ln.name in ('cache buffers lru chain') 
and ln.latch# = l.latch#;

排序命中率

select a.value "Sort(Disk)", b.value "Sort(Memory)",
round(100*(a.value/decode((a.value+b.value), 0,1,(a.value+b.value))),2) "% Ratio (STAY UNDER 5%)"  
from v$sysstat a, v$sysstat b
where a.name = 'sorts (disk)'
and b.name = 'sorts (memory)';

数据缓冲区命中率

désert/Oracle/Check (last edited 2022-05-26 03:44:21 by merlyn)