Topenq.sql

From DB Optimizer
Jump to: navigation, search
-- (c) Kyle Hailey 2007
column wait_event format a40
prompt shadow
select 
      o.name,
      current_obj#, 
      count(*) ,
      to_char(ash.p1,'XXXXXXXX')
from sash  ash,
    v$event_name n,
    obj$ o
where
    n.event#=ash.event#
 and n.name = 'enqueue'
 and o.obj# = current_obj#
group by o.name, current_obj# , ash.p1
order by count(*) 
/