正德厚生,臻于至善

cursors.sql

IF: How to Monitor and Tune the OPEN_CURSORS and SESSION_CACHED_CURSORS Parameters (Doc ID 2091529.1)

select
'session_cached_cursors' parameter,
lpad(value, 5) value,
decode(value, 0, ' n/a', to_char(100 * used / value, '990') || '%') usage
from
( select
max(s.value) used
from
gv$statname n,
gv$sesstat s
where
n.name = 'session cursor cache count' and
s.statistic# = n.statistic#
),
( select
value
from
gv$parameter
where
name = 'session_cached_cursors'
)
union all
select
'open_cursors',
lpad(value, 5),
to_char(100 * used / value, '990') || '%'
from
( select
max(sum(s.value)) used
from
gv$statname n,
gv$sesstat s
where
n.name in ('opened cursors current') and
s.statistic# = n.statistic#
group by
s.sid
),
( select
value
from
gv$parameter
where
name = 'open_cursors'
)
/
赞(0) 打赏
未经允许不得转载:徐万新之路 » cursors.sql

评论 抢沙发

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫

微信扫一扫

登录

找回密码

注册