Top 10 sessions from v$active_session_history

Description

This query returns the top 10 sessions from v$active_session_history. The result is ordered by total resources consumed by the session including I/O, WAITS and CPU
Be careful, this view is part of the diagnostic pack, you should not query this view if you don’t have license for it.

top 10 sessions from v$active_session_history

You can restrict period of time analyzed by filtering with the sample_time column.

2 thoughts on “Top 10 sessions from v$active_session_history

    1. Hi Sayan,

      Thanks you for reading my blog and for pointing this out.
      You’re right, by using a count we only get an approximation of the time waited as it can happen many things between each one second sample. But even if it is not an exact value it is most of the time sufficient to identify a problem. For further investigation I always look at the AWR report and if needed to a trace on the sql statements involved in the problem identified.

      Cyrille

Leave a Reply