Wondering if someone could advise on the best way of capturing the following in an 11g database.
Say we have;
- a piece of SQL executing around 50 times a minute.
- single execution times vary.
Aside from going through dba_hist_sqlstat and generating some sort of average over a 30 min period.
What would be the best way to obtain individual execution times of this piece of SQL in real-time.
say I want the individual execution time of that last 100 executions.
Any help would be appreciated
Trace the session (with wait events if you want) that executes the SQL and tkprof the trc file.
ORACLE-BASE - TKPROF And Oracle Trace
Oracle related stuff: Basic SQL statement performance diagnosis - HOW TO, step by step instructions