重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: 王硕
打印 上一主题 下一主题

rac 日常巡检

[复制链接]
41#
 楼主| 发表于 2015-4-19 18:50:41 | 只看该作者
3)锁竞争
SQL> 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#;  2    3    4    5    6  

NAME                       GETS     MISSES % Ratio (STAY UNDER 1%)
-------------------- ---------- ---------- -----------------------
cache buffers lru ch      42225          0                       0
ain

回复 支持 反对

使用道具 举报

42#
 楼主| 发表于 2015-4-19 18:50:54 | 只看该作者

4)排序命中率
SQL> 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)';  2    3    4    5  

Sort(Disk) Sort(Memory) % Ratio (STAY UNDER 5%)
---------- ------------ -----------------------
         0        30805                       0
回复 支持 反对

使用道具 举报

43#
 楼主| 发表于 2015-4-19 18:51:10 | 只看该作者

5)数据缓冲区命中率
SQL> select round((1-(phy.value/(cur.value+con.value)))*100,1)||'%' ratio 
from v$sysstat phy,v$sysstat cur,v$sysstat con
where phy.name='physical reads' and cur.name='db block gets' and con.name='consistent gets';  2    3  

RATIO
-----------------------------------------
98.7%

[此贴子已经被作者于2015-04-19 18:51:24编辑过]
回复 支持 反对

使用道具 举报

44#
 楼主| 发表于 2015-4-19 18:51:44 | 只看该作者
6)Miss LRU Hit命中率
SQL> column "Miss LRU Hit%" format 99.9999999;
col name format a40 
select name, (sleeps/gets) "Miss LRU Hit%"
from v$latch where name ='cache buffers lru chain';SQL> SQL>   2  

NAME                                     Miss LRU Hit%
---------------------------------------- -------------
cache buffers lru chain                       .0000000

回复 支持 反对

使用道具 举报

45#
 楼主| 发表于 2015-4-19 18:51:59 | 只看该作者
7)检查内存排序性能

SQL> select a.name, to_char(value)
from v$statname a, v$sysstat
where a.statistic# = v$sysstat.statistic#
and a.name in ('sorts (disk)', 'sorts (memory)', 'sorts (rows)');  2    3    4  

NAME                                     TO_CHAR(VALUE)
---------------------------------------- ----------------------------------------
sorts (memory)                           31095
sorts (disk)                             0
sorts (rows)                             1482328
回复 支持 反对

使用道具 举报

46#
 楼主| 发表于 2015-4-19 18:52:16 | 只看该作者
8)redo log buffer retry ratio

SQL> select to_char(r.value/e.value) "redo log buffer retry ratio"
from v$sysstat r,v$sysstat e
where r.name='redo buffer allocation retries'
and e.name='redo entries'; 

redo log buffer retry ratio
----------------------------------------
0

回复 支持 反对

使用道具 举报

47#
 楼主| 发表于 2015-4-19 18:52:41 | 只看该作者
9)wait等待检查
SQL> select count(*) total_in_wait from v$session_wait
where event='log buffer space';  2  

TOTAL_IN_WAIT
-------------
            0

SQL> select event,total_waits,time_waited,average_wait
from v$system_event
where event like '%undo%';  2    3  

EVENT                                                            TOTAL_WAITS TIME_WAITED AVERAGE_WAIT
---------------------------------------------------------------- ----------- ----------- ------------
undo segment extension                                                     4           3         .76




SQL> select sid,seq#,event,WAIT_TIME,SECONDS_IN_WAIT from v$session_wait where event not like 'SQL%'
and event not like 'rdbms%';  2  

       SID       SEQ# EVENT                                                             WAIT_TIME SECONDS_IN_WAIT
---------- ---------- ---------------------------------------------------------------- ---------- ---------------
         2       2746 pmon timer                                                               02
         3          1 VKTM Logical Idle Wait                                                   0     8392
         5      36359 DIAG idle wait                                                           00
         7       2205 PING                                                                     01
        10      31764 DIAG idle wait                                                           00
        12      39004 ges remote message                                                       00
        13      31731 gcs remote message                                                       00
        16       1528 heartbeat monitor sleep                                                  05
        21        843 smon timer                                                               0      286
        23       3989 ASM background timer                                                     00
        27       7629 wait for unread message on broadcast channel                             00
        31      37997 Streams AQ: waiting for messages in the queue                            01
        32        716 Streams AQ: waiting for time management or cleanup tasks                 0       14
        42        248 Space Manager: slave idle wait                                           02
        46       7587 wait for unread message on broadcast channel                             00
        47       1086 Streams AQ: qmn coordinator idle wait                                    0       15
        51        293 Streams AQ: qmn slave idle wait                                          0       15
        55          3 VKRM Idle                                                                0     3739

18 rows selected.
回复 支持 反对

使用道具 举报

48#
 楼主| 发表于 2015-4-19 18:52:53 | 只看该作者

28、查询lock锁
SQL>    SELECT lpad(' ',DECODE(request,0,0,1))||sid sess, id1, id2, lmode, request, type
FROM V$LOCK
WHERE id1 IN (SELECT id1 FROM V$LOCK WHERE lmode = 0)
ORDER BY id1, request;  2    3    4  

no rows selected

回复 支持 反对

使用道具 举报

49#
 楼主| 发表于 2015-4-19 18:54:00 | 只看该作者
TxrOQBz7.txt (81.36 KB, 下载次数: 102)
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-5-20 02:42 , Processed in 0.099320 second(s), 21 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表