Skip to Main Content
  • Questions
  • what are the drawbacks to Active Session History over Trace

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Anil Kumar.

Asked: October 03, 2016 - 6:48 pm UTC

Last updated: October 04, 2016 - 3:12 am UTC

Version: 11g

Viewed 1000+ times

You Asked

If we require an in-depth analysis from a process monitoring perspective it is important to realize that Oracle records details of what a session is doing as at the point it takes the sample, if in the one second since the previous sample your process has run some SQL statements then only the one that was being executed at the moment the sample was taken will be picked up. This means that for fast OLTP-type processes it is unlikely that we will obtain details of every statement issued by your process.

For OLTP type processes, what is your recommendation to get the details of each and every statement?

Regards,
Anil

and Connor said...

Tracing is obviously the most detailed, but obviously the most intrusive as well. If you are taking hundreds or thousands of calls per second, and thus missing information in ASH, then by the same rule, you would be logging a LOT of trace information.

I find ASH typically works even in these circumstances, because although its one second sampling, its rare that an application will run 100's of *different* operations per second, it will run the *same* set of operations over and over and over...so the data picked up by the one second samples is still representative.

And of course they are not mutually exclusive - you can use ASH to identify *potential* candidates for more detailed tracing.

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

Performance

Get all the information about database performance in the Database Performance guide.