select * from (select active_session_history.sql_id,dba_users.username,sqlarea.sql_text,sum(active_session_history.wait_time +active_session_history.time_waited) ttl_wait_timefrom v$active_session_history active_session_history,v$sqlarea sqlarea,dba_userswhereactive_session_history.sample_time between sysdate - 1/24 and sysdateand active_session_history.sql_id = sqlarea.sql_id
and active_session_history.user_id = dba_users.user_idgroup by active_session_history.sql_id,sqlarea.sql_text, dba_users.usernameorder by 4 desc )where rownum < 10;
Thursday, 11 September 2014
Top 5 SQL statements in the past one hour
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment