06 V$SYSTEM_EVENT

v$system_event
  • 인스턴스 기동 후 현재까지 누적된 이벤트 발생 현황을 "SYSTEM LEVEL"로 확인하고자 할 때 사용.
  • TIME_WAITED 가 높으면서 AVERAGE_WAIT도 높은 정보를 중심으로 해석함.

SELECT wait_class, 
       event, 
       time_waited, 
       average_wait 
FROM   v$system_event 
WHERE  wait_class <> 'Idle' 
ORDER  BY time_waited DESC;

WAIT_CLASS                     EVENT                                                        TIME_WAITED AVERAGE_WAIT
------------------------------ ------------------------------------------------------------ ----------- ------------
System I/O                     control file parallel write                                      2220296       253.57
Concurrency                    os thread startup                                                   2739         2.63
Other                          Streams AQ: qmn coordinator waiting for slave to start              2502       250.18
System I/O                     log file parallel write                                              498           .1
Other                          control file heartbeat                                               400       400.08
System I/O                     db file async I/O submit                                             279          .05
User I/O                       db file sequential read                                              243          .04
User I/O                       db file scattered read                                                88          .11
Commit                         log file sync                                                         74          .18
Administrative                 JS coord start wait                                                   68        34.15
User I/O                       db file parallel read                                                 58         1.71
Other                          enq: PR - contention                                                  54         8.96
System I/O                     control file sequential read                                          35            0
Other                          enq: PV - syncstart                                                   16        16.11
Concurrency                    latch: shared pool                                                    13          .03
System I/O                     log file sequential read                                              11          .68
Other                          rdbms ipc reply                                                        8           .5
Other                          parallel recovery coord wait for reply                                 4          .37
User I/O                       Disk file operations I/O                                               4          .01
Concurrency                    cursor: pin S wait on X                                                3         1.41

v$session_event
  • 인스턴스 기동 후 현재까지 누적된 이벤트 발생 현황을 "SESSION LEVEL"로 확인하고자 할 때 사용.

SELECT wait_class, 
       sid, 
       event, 
       time_waited, 
       average_wait 
FROM   v$session_event 
WHERE  wait_class <> 'Idle' 
ORDER  BY time_waited DESC; 

WAIT_CLASS                            SID EVENT                                                        TIME_WAITED AVERAGE_WAIT
------------------------------ ---------- ------------------------------------------------------------ ----------- ------------
System I/O                           1249 control file parallel write                                       649035          .19
System I/O                           1153 log file parallel write                                           554332           .2
System I/O                            961 db file async I/O submit                                          444315         2.06
System I/O                           1057 db file async I/O submit                                          443316         2.09
System I/O                            961 db file parallel write                                            137588          .62
System I/O                           1057 db file parallel write                                            137355          .63
Concurrency                             1 os thread startup                                                  95883         3.73
Other                                 770 events in waitclass Other                                          58001        487.4
Concurrency                           579 os thread startup                                                  46659         3.77
System I/O                              1 control file parallel write                                        30447          .14
System I/O                            290 log file sequential read                                            7195          .85
System I/O                            482 log file sequential read                                            6183          .74
Administrative                          1 JS coord start wait                                                 5871        49.75
System I/O                            578 log file sequential read                                            5740          .69
System I/O                           1249 control file sequential read                                        5044            0
System I/O                           1153 control file parallel write                                         1592          .16
User I/O                             1249 direct path read                                                    1085         3.81
Other                                1345 events in waitclass Other                                           1035          .05
System I/O                            386 control file sequential read                                         882            0
System I/O                            290 control file sequential read                                         851            0

v$session_wait
  • "세션 별로 현재 진행 중"이거나 "바로 직전"에 발생했던 이벤트 정보만을 보여줌.

SELECT sid, 
       seq#, 
       event, 
       wait_class, 
       wait_time 
FROM   v$session_wait 
WHERE  event NOT LIKE 'SQL*Net%' 
       AND event <> 'rdbms ipc message' 
ORDER  BY wait_time;

       SID       SEQ# EVENT                                                            WAIT_CLASS            WAIT_TIME
---------- ---------- ---------------------------------------------------------------- -------------------- ----------
       193       7932 pmon timer                                                       Idle                          0
       194        352 Streams AQ: waiting for time management or cleanup tasks         Idle                          0
       385          1 VKTM Logical Idle Wait                                           Idle                          0
       577      22705 DIAG idle wait                                                   Idle                          0
      1455       2653 Streams AQ: qmn slave idle wait                                  Idle                          0
       769       6579 DIAG idle wait                                                   Idle                          0
       770      32565 Streams AQ: qmn coordinator idle wait                            Idle                          0
      1345      58616 smon timer                                                       Idle                          0
       683         36 Space Manager: slave idle wait                                   Idle                          0

  • wait_time > 0: 마지막 대기이벤트를 대기한 시간
  • wait_time = 0: 이 이벤트를 현재 대기 중
  • wait_time = -1: 마지막 대기이벤트를 대기한 시간이 10ms 미만
  • wait_time = -2: 타이밍이 활성화되지 않음