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博客 ” ,链接:https://blog.itpub.net/28572479/viewspace-2126590/
,如需转载,请注明出处,否则将追究法律责任。