To check the sessions with most Active I/O


SELECT
DISTINCT wait_class
FROM
gv$event_name
ORDER
BY 1;

SELECT
sql_id, COUNT(*)
FROM
gv$active_session_history ash, gv$event_name evt
WHERE
ash.sample_time > SYSDATE – 1/24
AND
ash.session_state = ‘WAITING’
AND
ash.event_id = evt.event_id
AND
evt.wait_class = ‘User I/O’
GROUP
BY sql_id
ORDER
BY COUNT(*) DESC;
  • April 24, 2012 | 28 views
  • Comments