Top 10 queries from v$active_session_history

Cyrille Modiano

OCP Oracle DBA in Montreal at DBSoft

Latest posts by Cyrille Modiano (see all)


This query returns the top 10 queries by resource consumption (CPU+IO+WAIT) in the last hour from v$active_session_history.
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 queries from v$active_session_history

This query return top queries by resources consumed, you can easily return the top I/O, WAITS or CPU queries by changing the order by clause.

You can see my other post about how to build a graph from the v$active_session_history view here

One thought on “Top 10 queries from v$active_session_history

  1. I noticed this morning the Oracle tables from a specific schema got dropped in production yesterday evening. We don’t have audit in place. Can I capture information from history and other database views from which machine the delete came and at what time?

Leave a Reply