oracle job average duration

Solutions on MaxInterview for oracle job average duration by the best coders in the world

showing results for - "oracle job average duration"
Ellen
24 Aug 2017
1SELECT j.OWNER,
2       j.JOB_NAME,
3       j.REPEAT_INTERVAL,
4       avg(extract(DAY FROM d.RUN_DURATION) * 24 * 60 * 60
5           + extract(HOUR FROM d.RUN_DURATION) * 60 * 60
6           + extract(MINUTE FROM d.RUN_DURATION) * 60
7           + extract(SECOND FROM d.RUN_DURATION)) AS AVERAGE_D
8FROM DBA_SCHEDULER_JOBS j
9     LEFT JOIN DBA_SCHEDULER_JOB_RUN_DETAILS d
10               ON d.OWNER = j.OWNER AND d.JOB_NAME = j.JOB_NAME
11WHERE j.ENABLED = 'TRUE'
12  AND j.OWNER NOT IN ('SYS')
13GROUP BY j.OWNER,
14         j.JOB_NAME,
15         j.REPEAT_INTERVAL
16ORDER BY OWNER, JOB_NAME;