trying to find out how many times a sql script ran in one day.
"script 1" ran on june 2 according to a search OEM and shows up on about 96 snapshots. On an AWR that spans the whole day, it doesnt show up.
is there a way to find out how many times it ran?
i have looked at different tables and used "script 2" to compare with.
script 2 ran on june 2, 16,256 times according to an AWR that spanned the whole day.
but when doing a search like
select EXECUTIONS,FIRST_LOAD_TIME from gv$sql where SQL_ID = 'script2' order by FIRST_LOAD_TIME;
all i get is
EXECUTIONS FIRST_LOAD_TIME
---------- -------------------
973 2016-01-09/10:25:03
20 2016-01-09/10:25:03
5 2016-01-09/10:25:03
12 2016-01-09/10:25:03
I have also tried
select s.executions_total, s.sql_id, h.snap_id from dba_hist_sqlstat s, dba_hist_snapshot h
where h.BEGIN_INTERVAL_TIME between '02-JUN-16' and '03-JUN-16' and s.sql_id = 'script2' group by h.snap_id,s.executions_total,s.sql_id;
and that returns over 25,000 rows.