SET TIME ON VERIFY OFF
COLUMN event FORMAT A30 HEADING 'Event' TRUNCATE
COLUMN wait_state FORMAT A7 HEADING 'State'
COLUMN seconds_in_wait FORMAT 999999 HEADING 'Time|Waiting'
COLUMN wait_time FORMAT 999999 HEADING 'Time|Waited'
COLUMN p1 FORMAT A20 HEADING 'P1' TRUNCATE
COLUMN p2 FORMAT A20 HEADING 'P2' TRUNCATE
COLUMN p3 FORMAT A20 HEADING 'P3' TRUNCATE
SELECT vswh.event,
CASE WHEN vswh.state = 'WAITING' THEN vswh.state
ELSE 'WAITED'
END wait_state,
vswh.seconds_in_wait,
vswh.wait_time,
DECODE(vswh.p1text, NULL, NULL, vswh.p1text||'='||vswh.p1) p1,
DECODE(vswh.p2text, NULL, NULL, vswh.p2text||'='||vswh.p2) p2,
DECODE(vswh.p3text, NULL, NULL, vswh.p3text||'='||vswh.p3) p3
FROM gv$session_wait_history vswh
WHERE vswh.sid = &&user_sid
ORDER BY vswh.seq# DESC
/
UNDEFINE user_sid
No comments:
Post a Comment