RE: Enforcing SQL execution plan

From: <fmhabash_at_gmail.com>
Date: Fri, 2 Sep 2016 13:49:40 -0400
Message-ID: <57c9bbb5.4c036b0a.5e370.0c4a_at_mx.google.com>



So, how do the 2 runs compare when broken down by wait event class? What class is contributing the most to the bad run?

select st.SNAP_ID, st.sql_id, st.plan_hash_value, ss.begin_interval_time ,EXECUTIONS_DELTA execs
, IOWAIT_DELTA
, CLWAIT_TOTAL
, CCWAIT_DELTA
, APWAIT_DELTA
, CPU_TIME_DELTA
, ELAPSED_TIME_DELTA
, round((IOWAIT_DELTA/ELAPSED_TIME_DELTA)*100,2) io_wt_perc
, round((CLWAIT_TOTAL/ELAPSED_TIME_DELTA)*100,2) clust_wt_perc
, round((CCWAIT_DELTA/ELAPSED_TIME_DELTA)*100,2) concur_wt_perc
, round((APWAIT_DELTA/ELAPSED_TIME_DELTA)*100,2) app_wt_perc
, round((CPU_TIME_DELTA/ELAPSED_TIME_DELTA)*100) cpu_wt_perc
from dba_hist_sqlstat st, dba_hist_snapshot ss where
ss.snap_id = st.snap_id
and st.instance_number = (select instance_number from v$instance ) and EXECUTIONS_DELTA > 0
--and sql_id = '&sql_id'
and rownum < 1000
and begin_interval_time >= sysdate - 7
order by snap_id
;



Thank you

From: Hameed, Amir

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Sep 02 2016 - 19:49:40 CEST

Original text of this message