Topobj.sql

From DB Optimizer
Jump to: navigation, search
-- (c) Kyle Hailey 2007
column wait_name format a30
column object_name format a25
prompt shadow
select * from (
select
      o.object_name object_name,
      current_obj#,
      count(*) ,
      n.name wait_name
from sash  ash,
    v$event_name n,
    sash_objs o
where
    n.event#=ash.event#
 and o.object_id = ash.current_obj#
group by o.object_name, ash.current_obj# , n.name
order by count(*) desc
) where rownum < 21
/
~