FB 虽然是圆床~ 但是 写的是 uplooking老师的分享。
select
name,
value,
a.STATISTIC#
from
v$mystat a,
v$statname b
where a.STATISTIC#=b.STATISTIC#
and b.name like '%parse count%';
------------------------------ ------
parse count (total) 25
parse count (hard) 13
parse count (failures) 3
--查询当前会话的 硬链接数 的变化。 进一步分析 整个程序的 链接分布。
select
name,
value,
a.STATISTIC#,
a.sid
from
v$sesstat a,
v$statname b
where a.STATISTIC#=b.STATISTIC#
and b.name like '%parse count%'
and a.sid in(133,16) order by a.sid;
NAME VALUE STATISTIC# SID
------------------------------ ---------- ---------- ----------
parse count (describe) 0 586 16
parse count (hard) 4 584 16
parse count (failures) 2 585 16
parse count (total) 7 583 16
parse count (failures) 0 585 133
parse count (describe) 0 586 133
parse count (total) 4 583 133
parse count (hard) 1 584 133
数据库 按sid链接的分布情况。
select name,
value
from v$sysstat
where name like '%parse count%';
parse count (total) 4112
parse count (hard) 1498
parse count (failures) 19
parse count (describe) 12
整个数据库链接分布。以定位问题。