SQL Activity for the last hour

Cyrille Modiano

OCP Oracle DBA in Montreal at DBSoft

Latest posts by Cyrille Modiano (see all)

This script can be used to show the top 10 SQL activity for the last hour.
It uses the v$active_session_history view to search top SQL by resource consumption.

Top 10 SQL Activity

Here is the result you can obtain:

SQL activity

and the active sessions history graph for the same period:

instance activity last hour

WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE AND comment_parent IN (64,854) ORDER BY comment_date_gmt ASC, comment_ID' at line 1]
SELECT rkq_comments.comment_ID, rkq_comments.comment_parent WHERE AND comment_parent IN (64,854) ORDER BY comment_date_gmt ASC, comment_ID ASC

4 thoughts on “SQL Activity for the last hour

Leave a Reply