Database Administration (MOSC)

MOSC Banner

Number of executions in AWR report

edited Jun 4, 2021 5:03AM in Database Administration (MOSC) 5 comments

Hello!


Can You please explain , the reason of the big difference of values in section

"Top SQL Comparison by Executions" (#Executions) in AWR report and result of query (the same period)


SELECT count(*) ,sql_id, user_id, machine,

      (select username from dba_users where user_id = a.user_id) ,

to_char(trunc(a.SAMPLE_TIME, 'mi'), 'dd-mon-yyyy hh24:mi')

FROM  dba_hist_active_sess_history a

WHERE

 a.SAMPLE_TIME between ...

and sql_id in ( ...)

group by sql_id, user_id, machine, to_char(trunc(a.SAMPLE_TIME, 'mi'), 'dd-mon-yyyy hh24:mi')

order by to_char(trunc(a.SAMPLE_TIME, 'mi'), 'dd-mon-yyyy hh24:mi');

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center