Database Tips
SET LINESIZE 120 SET PAGESIZE 1000 col snap_begin format a35 COL executions FOR 999,999,999 COL elapsed_time FOR 999,999,999,999 COL avg_ms FOR 9999999.99 COL min_ms FOR 9999999.99 COL max_ms FOR 9999999.99 SELECT TO_CHAR(TRUNC(snapshot.begin_interval_time,'HH24'),'DD-MON-YYYY HH24:MI:SS') || ' EDT' SNAP_BEGIN, sqlstat.instance_number, SUM(sqlstat.executions_delta) executions, MIN(sqlstat.elapsed_time_delta / sqlstat.executions_delta / 1000) min_ms, MAX(sqlstat.elapsed_time_delta / sqlstat.executions_delta / 1000) max_ms, SUM(sqlstat.elapsed_time_delta) / SUM(sqlstat.executions_delta) / 1000 avg_Ms FROM dba_hist_sqlstat sqlstat, dba_hist_snapshot snapshot WHERE sqlstat.dbid = snapshot.dbid AND sqlstat.instance_number = snapshot.instance_number AND sqlstat.snap_id = snapshot.snap_id AND sqlstat.sql_id = '&1' AND snapshot.begin_interval_time >= SYSDATE-60 GROUP BY TO_CHAR(TRUNC(snapshot.begin_interval_time,'HH24'),'DD-MON-YYYY HH24:MI:SS') || ' EDT', sqlstat.instance_number ORDER BY snap_begin /
SNAP_BEGIN INSTANCE_NUMBER EXECUTIONS MIN_MS MAX_MS AVG_MS ----------------------------------- --------------- ------------ ----------- ----------- ----------- 01-JUL-2015 00:00:00 EDT 1 2 16160.94 16569.28 16365.11 01-JUL-2015 00:00:00 EDT 4 2 16530.52 96809.78 56670.15 01-JUL-2015 01:00:00 EDT 1 2 16008.20 16273.29 16140.74 01-JUL-2015 01:00:00 EDT 4 2 96150.86 96213.51 96182.18 01-JUL-2015 02:00:00 EDT 1 2 16417.98 16606.18 16512.08 01-JUL-2015 02:00:00 EDT 4 2 96991.15 97816.36 97403.75 01-JUL-2015 02:00:00 EDT 5 2 121063.36 271762.59 196412.97
Post a Comment
No comments:
Post a Comment