Friday, June 11, 2021

How To Find Execution History Of An Sql_id | SQL Tuning

 select a.instance_number inst_id, a.snap_id,a.plan_hash_value, to_char(begin_interval_time,'dd-mon-yy hh24:mi') btime, abs(extract(minute from (end_interval_time-begin_interval_time)) + 

extract(hour from (end_interval_time-begin_interval_time))*60 

+ extract(day from (end_interval_time-begin_interval_time))*24*60) minutes,

executions_delta executions, 

round(ELAPSED_TIME_delta/1000000/greatest(executions_delta,1),4) "avg duration (sec)" from dba_hist_SQLSTAT a, dba_hist_snapshot b

where sql_id='&sql_id' and a.snap_id=b.snap_id

and a.instance_number=b.instance_number

order by snap_id desc, a.instance_number;


No comments:

Post a Comment

FAQ: Oracle E-Business Suite and the Oracle Multitenant Architecture

Section 1: General Questions How does Oracle E-Business Suite support the multitenant architecture? Oracle E-Business Suite supports the mul...