![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I'm trying to understand these queries. *They both gather data from the wait event views, but they return totally different results. *The one that comes from the system views seems to be much more static. Should I be looking at one over the other, or is one more accurate on the system health? SELECT a.event, a.total_waits, a.time_waited, a.average_wait FROM v$system_event a, v$event_name b, v$system_wait_class c WHERE a.event_id=b.event_id AND b.wait_class#=c.wait_class# AND c.wait_class IN ('Application','Concurrency') ORDER BY average_wait DESC; SELECT event, total_waits, time_waited, average_wait FROM (SELECT a.event, a.total_waits, a.time_waited, a.average_wait, ROW_NUMBER() OVER (PARTITION BY a.event ORDER BY average_wait DESC) rnum * * * * * FROM v$session_event a, v$event_name b, v$session_wait_class c * * * * * WHERE a.event_id=b.event_id * * * * * AND b.wait_class#=c.wait_class# * * * * *AND c.wait_class IN ('Application','Concurrency')) WHERE rnum = 1 ORDER BY average_wait DESC; |
![]() |
| Thread Tools | |
| Display Modes | |
| |