指定快照時間內根據等待類查詢消耗較高的sql

raysuen發表於2016-10-17
select wait_class_id, wait_class, count(*) cnt  from dba_hist_active_sess_history where snap_id between 5508 and 5518 group by wait_class_id, wait_class order by 3;
select event_id, event, count(*) cnt from dba_hist_active_sess_history  where snap_id between 5508 and 5518 and wait_class_id=3871361733 group by event_id, event order by 3;
select sql_id, count(*) cnt--,INSTANCE_NUMBER 
from dba_hist_active_sess_history where snap_id between 5508 and 5518 and event_id =2701629120 group by sql_id having count(*)>1000 order by 2;
select sql_text from dba_hist_sqltext where sql_id in ('47mxm4f2cftr0','5pydzyuuzy5tp');

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28572479/viewspace-2126590/,如需轉載,請註明出處,否則將追究法律責任。

相關文章