有朋友问道这个问题,在 AWR 中,Redo Nowait 比例的含义。在很多报告中,这个值出现了负数。
其实从 Statspack 的报告中,就可以找到计算公式:
--
-- Instance Efficiency Percentages
column ldscr format a50
column nl format a60 newline;
select 'Instance Efficiency Percentages (Target 100%)' ldscr
,'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' ldscr
,' Buffer Nowait %:' dscr
, round(100*(1-:bfwt/:gets),2) pctval
,' Redo NoWait %:'
, decode(:rent,0,to_number(null), round(100*(1-:rlsr/:rent),2)) pctval
,' Buffer Hit %:' dscr
, round(100*(1-(:phyr-:phyrd-:phyrdl)/:gets),2) pctval
,' In-memory Sort %:'
, decode((:srtm+:srtd),0,to_number(null),
round(100*:srtm/(:srtd+:srtm),2)) pctval
,' Library Hit %:' dscr
, round(100*:lhtr,2) pctval
,' Soft Parse %:'
, round(100*(1-:hprs/:prse),2) pctval
,' Execute to Parse %:' dscr
, round(100*(1-:prse/:exe),2) pctval
,' Latch Hit %:'
, round(100*(1-:lhr),2) pctval
,'Parse CPU to Parse Elapsd %:' dscr
, decode(:prsela, 0, to_number(null)
, round(100*:prscpu/:prsela,2)) pctval
,' % Non-Parse CPU:'
, decode(:tcpu, 0, to_number(null)
, round(100*1-(:prscpu/:tcpu),2)) pctval
from sys.dual;
这其中能够看到很多比率的计算方式,Nowait Redo 的计算如下:
decode(:rent,0,to_number(null), round(100*(1-:rlsr/:rent),2)) pctval
这其中:
rlsr = Redo Log space requests
rent = Redo Entries
有了这个计算公式,就可以理解其中的玄机了。如果 Redo Log Space 的请求非常多,这个计算就可能出现负数,或者 rent 溢出变小都是可能的情况。
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




