Menu

#2 seswaits query is buggy

open
sql queries (1)
5
2001-03-21
2001-03-21
No

the sesion waits query, has problems. I get the
current waits for a particular session from
v$session_event, but this table is not updated until a
new event is hit. It seems that
v$session_wait.seconds_in_wait has the amount of time
waited in current wait. I'd like to add this amount to
the amounts from v$session_event. The only problem is
that seconds_in_wait seems to work sometimes an other
time it returns values in the millions. I opened a
tar. If this is a bug or a feature will have to be
content with just using the values from v$session_event

set public(sql,seswaits) "
select
/* event number , se.EVENT */
se.kslesenm event,
/* total waits , se.TOTAL_WAITS */
se.ksleswts waits,
/* se.TIME_WAITED + decode
(se.event,sw.event,sw.seconds_in_wait,0) */
se.kslestim + decode
(se.kslesenm,sw.KSUSSOPC,sw.KSUSEWTM,0) time ,
/* se.TIME_WAITED + decode
(se.event,sw.event,sw.seconds_in_wait,0) */
decode(se.kslesenm,sw.KSUSSOPC,
ksussp1||' '||ksussp2||' '||ksussp3,0)
details
from
x\\\\\\\$ksles se, /* session_event */
x\\\\\\\$ksusecst sw /* session_wait */
where se.ksleswts > 0 /*
se.TOTAL_WAITS > 0 */
and se.kslessid = \$public(tusr,sid) /* se.sid =
7 */
and sw.indx = se.kslessid /*
sw.sid=se.sid */ "

Discussion


Log in to post a comment.