SQL*Plus: Release 10.2.0.4.0 - Production on Fri May 11 18:04:26 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options
USERNAME INST_NAME HOST_NAME SID SERIAL# VERSION STARTED SPID OPID CPID SADDR PADDR
-------------------- ------------ ------------------------- ----- -------- ---------- -------- --------------- ----- --------------- ---------------- ----------------
SYS BWD r3dev 586 12 10.2.0.4.0 20120511 1040800 13 1290836 0700000188BA37C8 07000001887FC5A0
-ne
SQL> @snapper ash 5 1 474 -- V$ACTIVE_SESSION_HISTORY로부터 데이터를 읽되, 5초 동안 1번의 스냅샷을 통해 474번 세션의 성능 정보 리포트
Sampling SID 474 with interval 5 seconds, taking 1 snapshots...
-- Session Snapper v3.52 by Tanel Poder @ E2SN ( http://tech.e2sn.com)
---------------------------------------------------------------------------------
Active% | SQL_ID | EVENT | WAIT_CLASS
---------------------------------------------------------------------------------
52% | gy5xm0s9qsupc | read by other session | User I/O
35% | gy5xm0s9qsupc | db file sequential read | User I/O
13% | gy5xm0s9qsupc | ON CPU | ON CPU
-- End of ASH snap 1, end=2012-05-11 18:18:24, seconds=5, samples_taken=46
PL/SQL procedure successfully completed.
SQL>@snapperash=sid+event+wait_class,ash1=plsql_object_id+plsql_subprogram_id+sql_id,ash2=program+module+action 5 1 all
Sampling SID all with interval 5 seconds, taking 1 snapshots...
-- Session Snapper v3.52 by Tanel Poder @ E2SN ( http://tech.e2sn.com)
------------------------------------------------------------------------
Active% | SID | EVENT | WAIT_CLASS
------------------------------------------------------------------------
100% | 221 | db file sequential read | User I/O
100% | 250 | db file sequential read | User I/O
98% | 94 | db file sequential read | User I/O
98% | 472 | db file sequential read | User I/O
95% | 372 | db file sequential read | User I/O
90% | 231 | db file sequential read | User I/O
68% | 392 | db file sequential read | User I/O
63% | 398 | db file sequential read | User I/O
18% | 256 | db file sequential read | User I/O
15% | 321 | db file sequential read | User I/O
---------------------------------------------------
Active% | PLSQL_OBJE | PLSQL_SUBP | SQL_ID
---------------------------------------------------
268% | | | 1n0qp2ppx4xb6
100% | | | 4r2z4grh7z216
100% | | | 9bkwsu6h2h054
65% | | | 1ajy753y74q4r
63% | | | 78dx9cvwzk9nq
25% | | | 1rtxjds0zcugz
23% | | | bzwp1br33tuhn
18% | | | 57gb6v1btkf06
15% | | | 376qq9b4g5jtk
15% | | | 4jgqmk2fs974h
-------------------------------------------------------------------------------------------
Active% | PROGRAM | MODULE | ACTION
-------------------------------------------------------------------------------------------
168% | dw.sapPRD_D00@r3prdap2 (T | SAPLZSD_CLOSING_TUTOR_N | 1608
100% | dw.sapPRD_D00@r3prdap1 (T | SAPLXRSA | 7530
100% | dw.sapPRD_D00@r3prdap1 (T | ZSDC0506_DAILY | 512
100% | dw.sapPRD_D00@r3prdap3 (T | SAPLZSD_CLOSING_TUTOR_N | 1608
98% | dw.sapPRD_D00@r3prdap3 (T | SAPLZFI_DUTY_AMOUNT | 638
95% | dw.sapPRD_D00@r3prdap2 (T | ZSDSINFO | 2917
63% | dw.sapPRD_D00@r3prdap3 (T | SAPLXRSA | 7602
20% | dw.sapPRD_D00@r3prdap1 (T | RSM13000 | 11698
20% | dw.sapPRD_D00@r3prdap2 (T | SAPMV45A | 31173
13% | dw.sapPRD_D00@r3prdap3 (T | ZSDA0012 | 2000
-- End of ASH snap 1, end=2012-05-11 18:31:48, seconds=5, samples_taken=40
PL/SQL procedure successfully completed
SQL> @latchprof name % % 100000
-- LatchProf 2.00 by Tanel Poder ( http://www.tanelpoder.com )
NAME Held Gets Held % Held ms Avg hold ms
----------------------------------- ---------- ---------- ------- ----------- -----------
cache buffers chains 311 287 .31 9.112 .032
simulator lru latch 7 7 .01 .205 .029
cache buffers lru chain 6 6 .01 .176 .029
row cache objects 5 5 .01 .147 .029
SQL memory manager latch 4 1 .00 .117 .117
undo global data 2 2 .00 .059 .029
enqueue hash chains 1 1 .00 .029 .029
active checkpoint queue latch 1 1 .00 .029 .029
8 rows selected.
-- _Parameter 1 specifies which columns from V$LATCHHOLDER to report and group by. In the case below I just want to report latch holds by latch name (and not even break it down by SID for starters)_
-- _Parameter 2 specifies which SIDs to monitor. In the case below, I am interested in any SID which holds a latch (%)_
-- _Parameter 3 specifies which latches to monitor. This can be set either to latch name or latch address in memory. In the case below, I monitor all latches (%)_
-- _Parameter 4 specifies how many times to sample V$LATCHHOLDER. I use 100000 samples below, which completed in a couple of seconds on my test database. The sampling speed depends on your server CPU/memory bus speed and the value of processes parameter. You should start from lower number like 1000 and adjust it so that LatchProf would complete its sampling in a couple of seconds, and that is usually enough for diagnosing ongoing latch contention problems. You shouldn't keep sampling for long periods since LatchProf runs constantly on the CPU_
-- _Name -Latch name_
-- _Held - During how many samples out of total samples (100000) the particular latch was held by somebody_
-- _Gets -How many latch gets against that latch were detected during LatchProf sampling_
-- _Held % -How much % of time was the latch held by somebody during the sampling. This is the main column you want to be looking at in order to see who/what holds the latch the most (the latchprof output is reverse-ordered by that column)_
-- _Held ms -How many milliseconds in total was the latch held during the sampling_
-- _Avg hold ms -Average latch hold time in milliseconds (normally latches are held from a few to few hundred microseconds_
- 강좌 URL : http://www.gurubee.net/lecture/4320
- 구루비 강좌는 개인의 학습용으로만 사용 할 수 있으며, 다른 웹 페이지에 게재할 경우에는 출처를 꼭 밝혀 주시면 고맙겠습니다.~^^
- 구루비 강좌는 서비스 제공을 위한 목적이나, 학원 홍보, 수익을 얻기 위한 용도로 사용 할 수 없습니다.