DB Namephp |
DB Id算法 |
Instancesql |
Inst num數據庫 |
Release安全 |
RACsession |
Host數據結構 |
ICCI併發 |
1314098396socket |
ICCI1ide |
1 |
10.2.0.3.0 |
YES |
HPGICCI1 |
|
Snap Id |
Snap Time |
Sessions |
Cursors/Session |
Begin Snap: |
2678 |
25-Dec-08 14:04:50 |
24 |
1.5 |
End Snap: |
2680 |
25-Dec-08 15:23:37 |
26 |
1.5 |
Elapsed: |
|
78.79 (mins) |
|
|
DB Time: |
|
11.05 (mins) |
|
|
DB Time不包括Oracle後臺進程消耗的時間。若是DB Time遠遠小於Elapsed時間,說明數據庫比較空閒。
在79分鐘裏(其間收集了3次快照數據),數據庫耗時11分鐘,RDA數據中顯示系統有8個邏輯CPU(4個物理CPU),平均每一個CPU耗時1.4分鐘,CPU利用率只有大約2%(1.4/79)。說明系統壓力很是小。
但是對於批量系統,數據庫的工做負載老是集中在一段時間內。若是快照週期不在這一段時間內,或者快照週期跨度太長而包含了大量的數據庫空閒時間,所得出的分析結果是沒有意義的。這也說明選擇分析時間段很關鍵,要選擇可以表明性能問題的時間段。
|
Begin |
End |
|
|
Buffer Cache: |
3,344M |
3,344M |
Std Block Size: |
8K |
Shared Pool Size: |
704M |
704M |
Log Buffer: |
14,352K |
顯示SGA中每一個區域的大小(在AMM改變它們以後),可用來與初始參數值比較。
shared pool主要包括library cache和dictionary cache。library cache用來存儲最近解析(或編譯)後SQL、PL/SQL和Java classes等。library cache用來存儲最近引用的數據字典。發生在library cache或dictionary cache的cache miss代價要比發生在buffer cache的代價高得多。所以shared pool的設置要確保最近使用的數據都能被cache。
|
Per Second |
Per Transaction |
Redo size: |
918,805.72 |
775,912.72 |
Logical reads: |
3,521.77 |
2,974.06 |
Block changes: |
1,817.95 |
1,535.22 |
Physical reads: |
68.26 |
57.64 |
Physical writes: |
362.59 |
306.20 |
User calls: |
326.69 |
275.88 |
Parses: |
38.66 |
32.65 |
Hard parses: |
0.03 |
0.03 |
Sorts: |
0.61 |
0.51 |
Logons: |
0.01 |
0.01 |
Executes: |
354.34 |
299.23 |
Transactions: |
1.18 |
|
% Blocks changed per Read: |
51.62 |
Recursive Call %: |
51.72 |
Rollback per transaction %: |
85.49 |
Rows per Sort: |
######## |
顯示數據庫負載概況,將之與基線數據比較才具備更多的意義,若是每秒或每事務的負載變化不大,說明應用運行比較穩定。單個的報告數據只說明應用的負載狀況,絕大多數據並無一個所謂「正確」的值,然而Logons大於每秒1~2個、Hard parses大於每秒100、所有parses超過每秒300代表可能有爭用問題。
Redo size:每秒/每事務產生的redo大小(單位字節),可標誌數據庫任務的繁重程序。
Logical reads:每秒/每事務邏輯讀的塊數
Block changes:每秒/每事務修改的塊數
Physical reads:每秒/每事務物理讀的塊數
Physical writes:每秒/每事務物理寫的塊數
User calls:每秒/每事務用戶call次數
Parses:SQL解析的次數
Hard parses:其中硬解析的次數,硬解析太多,說明SQL重用率不高。
Sorts:每秒/每事務的排序次數
Logons:每秒/每事務登陸的次數
Executes:每秒/每事務SQL執行次數
Transactions:每秒事務數
Blocks changed per Read:表示邏輯讀用於修改數據塊的比例
Recursive Call:遞歸調用佔全部操做的比率
Rollback per transaction:每事務的回滾率
Rows per Sort:每次排序的行數
注:
Oracle的硬解析和軟解析
提到軟解析(soft parse)和硬解析(hard parse),就不能不說一下Oracle對sql的處理過程。當你發出一條sql語句交付Oracle,在執行和獲取結果前,Oracle對此sql將進行幾個步驟的處理過程:
一、語法檢查(syntax check)
檢查此sql的拼寫是否語法。
二、語義檢查(semantic check)
諸如檢查sql語句中的訪問對象是否存在及該用戶是否具有相應的權限。
三、對sql語句進行解析(parse)
利用內部算法對sql進行解析,生成解析樹(parse tree)及執行計劃(execution plan)。
四、執行sql,返回結果(execute and return)
其中,軟、硬解析就發生在第三個過程裏。
Oracle利用內部的hash算法來取得該sql的hash值,而後在library cache裏查找是否存在該hash值;
假設存在,則將此sql與cache中的進行比較;
假設「相同」,就將利用已有的解析樹與執行計劃,而省略了優化器的相關工做。這也就是軟解析的過程。
誠然,若是上面的2個假設中任有一個不成立,那麼優化器都將進行建立解析樹、生成執行計劃的動做。這個過程就叫硬解析。
建立解析樹、生成執行計劃對於sql的執行來講是開銷昂貴的動做,因此,應當極力避免硬解析,儘可能使用軟解析。
Buffer Nowait %: |
100.00 |
Redo NoWait %: |
100.00 |
Buffer Hit %: |
98.72 |
In-memory Sort %: |
99.86 |
Library Hit %: |
99.97 |
Soft Parse %: |
99.92 |
Execute to Parse %: |
89.09 |
Latch Hit %: |
99.99 |
Parse CPU to Parse Elapsd %: |
7.99 |
% Non-Parse CPU: |
99.95 |
本節包含了Oracle關鍵指標的內存命中率及其它數據庫實例操做的效率。其中Buffer Hit Ratio 也稱Cache Hit Ratio,Library Hit ratio也稱Library Cache Hit ratio。同Load Profile一節相同,這一節也沒有所謂「正確」的值,而只能根據應用的特色判斷是否合適。在一個使用直接讀執行大型並行查詢的DSS環境,20%的Buffer Hit Ratio是能夠接受的,而這個值對於一個OLTP系統是徹底不能接受的。根據Oracle的經驗,對於OLTPT系統,Buffer Hit Ratio理想應該在90%以上。
Buffer Nowait表示在內存得到數據的未等待比例。
buffer hit表示進程從內存中找到數據塊的比率,監視這個值是否發生重大變化比這個值自己更重要。對於通常的OLTP系統,若是此值低於80%,應該給數據庫分配更多的內存。
Redo NoWait表示在LOG緩衝區得到BUFFER的未等待比例。若是過低(可參考90%閥值),考慮增長LOG BUFFER。
library hit表示Oracle從Library Cache中檢索到一個解析過的SQL或PL/SQL語句的比率,當應用程序調用SQL或存儲過程時,Oracle檢查Library Cache肯定是否存在解析過的版本,若是存在,Oracle當即執行語句;若是不存在,Oracle解析此語句,並在Library Cache中爲它分配共享SQL區。低的library hit ratio會致使過多的解析,增長CPU消耗,下降性能。若是library hit ratio低於90%,可能須要調大shared pool區。
Latch Hit:Latch是一種保護內存結構的鎖,能夠認爲是SERVER進程獲取訪問內存數據結構的許可。要確保Latch Hit>99%,不然意味着Shared Pool latch爭用,可能因爲未共享的SQL,或者Library Cache過小,可以使用綁定變動或調大Shared Pool解決。
Parse CPU to Parse Elapsd:解析實際運行時間/(解析實際運行時間+解析中等待資源時間),越高越好。
Non-Parse CPU :SQL實際運行時間/(SQL實際運行時間+SQL解析時間),過低表示解析消耗時間過多。
Execute to Parse:是語句執行與分析的比例,若是要SQL重用率高,則這個比例會很高。該值越高表示一次解析後被重複執行的次數越多。
In-memory Sort:在內存中排序的比率,若是太低說明有大量的排序在臨時表空間中進行。考慮調大PGA。
Soft Parse:軟解析的百分比(softs/softs+hards),近似看成sql在共享區的命中率,過低則須要調整應用使用綁定變量。
|
Begin |
End |
Memory Usage %: |
47.19 |
47.50 |
% SQL with executions>1: |
88.48 |
79.81 |
% Memory for SQL w/exec>1: |
79.99 |
73.52 |
Memory Usage %:對於一個已經運行一段時間的數據庫來講,共享池內存使用率,應該穩定在75%-90%間,若是過小,說明Shared Pool有浪費,而若是高於90,說明共享池中有爭用,內存不足。
SQL with executions>1:執行次數大於1的sql比率,若是此值過小,說明須要在應用中更多使用綁定變量,避免過多SQL解析。
Memory for SQL w/exec>1:執行次數大於1的SQL消耗內存的佔比。
Event |
Waits |
Time(s) |
Avg Wait(ms) |
% Total Call Time |
Wait Class |
CPU time |
|
515 |
|
77.6 |
|
SQL*Net more data from client |
27,319 |
64 |
2 |
9.7 |
Network |
log file parallel write |
5,497 |
47 |
9 |
7.1 |
System I/O |
db file sequential read |
7,900 |
35 |
4 |
5.3 |
User I/O |
db file parallel write |
4,806 |
34 |
7 |
5.1 |
System I/O |
這是報告概要的最後一節,顯示了系統中最嚴重的5個等待,按所佔等待時間的比例倒序列示。當咱們調優時,總但願觀察到最顯著的效果,所以應當從這裏入手肯定咱們下一步作什麼。例如若是‘buffer busy wait’是較嚴重的等待事件,咱們應當繼續研究報告中Buffer Wait和File/Tablespace IO區的內容,識別哪些文件致使了問題。若是最嚴重的等待事件是I/O事件,咱們應當研究按物理讀排序的SQL語句區以識別哪些語句在執行大量I/O,並研究Tablespace和I/O區觀察較慢響應時間的文件。若是有較高的LATCH等待,就須要察看詳細的LATCH統計識別哪些LATCH產生的問題。
在這裏,log file parallel write是相對比較多的等待,佔用了7%的CPU時間。
一般,在沒有問題的數據庫中,CPU time老是列在第一個。
更多的等待事件,參見本報告 的Wait Events一節。
|
Begin |
End |
Number of Instances: |
2 |
2 |
|
Per Second |
Per Transaction |
Global Cache blocks received: |
4.16 |
3.51 |
Global Cache blocks served: |
5.97 |
5.04 |
GCS/GES messages received: |
408.47 |
344.95 |
GCS/GES messages sent: |
258.03 |
217.90 |
DBWR Fusion writes: |
0.05 |
0.05 |
Estd Interconnect traffic (KB) |
211.16 |
|
Buffer access - local cache %: |
98.60 |
Buffer access - remote cache %: |
0.12 |
Buffer access - disk %: |
1.28 |
Avg global enqueue get time (ms): |
0.1 |
Avg global cache cr block receive time (ms): |
1.1 |
Avg global cache current block receive time (ms): |
0.8 |
Avg global cache cr block build time (ms): |
0.0 |
Avg global cache cr block send time (ms): |
0.0 |
Global cache log flushes for cr blocks served %: |
3.5 |
Avg global cache cr block flush time (ms): |
3.9 |
Avg global cache current block pin time (ms): |
0.0 |
Avg global cache current block send time (ms): |
0.0 |
Global cache log flushes for current blocks served %: |
0.4 |
Avg global cache current block flush time (ms): |
3.0 |
Avg message sent queue time (ms): |
0.0 |
Avg message sent queue time on ksxp (ms): |
0.3 |
Avg message received queue time (ms): |
0.5 |
Avg GCS message process time (ms): |
0.0 |
Avg GES message process time (ms): |
0.0 |
% of direct sent messages: |
14.40 |
% of indirect sent messages: |
77.04 |
% of flow controlled messages: |
8.56 |
Statistic Name |
Time (s) |
% of DB Time |
DB CPU |
514.50 |
77.61 |
sql execute elapsed time |
482.27 |
72.74 |
parse time elapsed |
3.76 |
0.57 |
PL/SQL execution elapsed time |
0.50 |
0.08 |
hard parse elapsed time |
0.34 |
0.05 |
connection management call elapsed time |
0.08 |
0.01 |
hard parse (sharing criteria) elapsed time |
0.00 |
0.00 |
repeated bind elapsed time |
0.00 |
0.00 |
PL/SQL compilation elapsed time |
0.00 |
0.00 |
failed parse elapsed time |
0.00 |
0.00 |
DB time |
662.97 |
|
background elapsed time |
185.19 |
|
background cpu time |
67.48 |
|
此節顯示了各類類型的數據庫處理任務所佔用的CPU時間。
Back to Wait Events Statistics
Back to Top
Wait Class |
Waits |
%Time -outs |
Total Wait Time (s) |
Avg wait (ms) |
Waits /txn |
User I/O |
66,837 |
0.00 |
120 |
2 |
11.94 |
System I/O |
28,295 |
0.00 |
93 |
3 |
5.05 |
Network |
1,571,450 |
0.00 |
66 |
0 |
280.72 |
Cluster |
210,548 |
0.00 |
29 |
0 |
37.61 |
Other |
81,783 |
71.82 |
28 |
0 |
14.61 |
Application |
333,155 |
0.00 |
16 |
0 |
59.51 |
Concurrency |
5,182 |
0.04 |
5 |
1 |
0.93 |
Commit |
919 |
0.00 |
4 |
4 |
0.16 |
Configuration |
25,427 |
99.46 |
1 |
0 |
4.54 |
Back to Wait Events Statistics
Back to Top
Event |
Waits |
%Time -outs |
Total Wait Time (s) |
Avg wait (ms) |
Waits /txn |
SQL*Net more data from client |
27,319 |
0.00 |
64 |
2 |
4.88 |
log file parallel write |
5,497 |
0.00 |
47 |
9 |
0.98 |
db file sequential read |
7,900 |
0.00 |
35 |
4 |
1.41 |
db file parallel write |
4,806 |
0.00 |
34 |
7 |
0.86 |
db file scattered read |
10,310 |
0.00 |
31 |
3 |
1.84 |
direct path write |
42,724 |
0.00 |
30 |
1 |
7.63 |
reliable message |
355 |
2.82 |
18 |
49 |
0.06 |
SQL*Net break/reset to client |
333,084 |
0.00 |
16 |
0 |
59.50 |
db file parallel read |
3,732 |
0.00 |
13 |
4 |
0.67 |
gc current multi block request |
175,710 |
0.00 |
10 |
0 |
31.39 |
control file sequential read |
15,974 |
0.00 |
10 |
1 |
2.85 |
direct path read temp |
1,873 |
0.00 |
9 |
5 |
0.33 |
gc cr multi block request |
20,877 |
0.00 |
8 |
0 |
3.73 |
log file sync |
919 |
0.00 |
4 |
4 |
0.16 |
gc cr block busy |
526 |
0.00 |
3 |
6 |
0.09 |
enq: FB - contention |
10,384 |
0.00 |
3 |
0 |
1.85 |
DFS lock handle |
3,517 |
0.00 |
3 |
1 |
0.63 |
control file parallel write |
1,946 |
0.00 |
3 |
1 |
0.35 |
gc current block 2-way |
4,165 |
0.00 |
2 |
0 |
0.74 |
library cache lock |
432 |
0.00 |
2 |
4 |
0.08 |
name-service call wait |
22 |
0.00 |
2 |
76 |
0.00 |
row cache lock |
3,894 |
0.00 |
2 |
0 |
0.70 |
gcs log flush sync |
1,259 |
42.02 |
2 |
1 |
0.22 |
os thread startup |
18 |
5.56 |
2 |
89 |
0.00 |
gc cr block 2-way |
3,671 |
0.00 |
2 |
0 |
0.66 |
gc current block busy |
113 |
0.00 |
1 |
12 |
0.02 |
SQL*Net message to client |
1,544,115 |
0.00 |
1 |
0 |
275.83 |
gc buffer busy |
15 |
6.67 |
1 |
70 |
0.00 |
gc cr disk read |
3,272 |
0.00 |
1 |
0 |
0.58 |
direct path write temp |
159 |
0.00 |
1 |
5 |
0.03 |
gc current grant busy |
898 |
0.00 |
1 |
1 |
0.16 |
log file switch completion |
29 |
0.00 |
1 |
17 |
0.01 |
CGS wait for IPC msg |
48,739 |
99.87 |
0 |
0 |
8.71 |
gc current grant 2-way |
1,142 |
0.00 |
0 |
0 |
0.20 |
kjbdrmcvtq lmon drm quiesce: ping completion |
9 |
0.00 |
0 |
19 |
0.00 |
enq: US - contention |
567 |
0.00 |
0 |
0 |
0.10 |
direct path read |
138 |
0.00 |
0 |
1 |
0.02 |
enq: WF - contention |
14 |
0.00 |
0 |
9 |
0.00 |
ksxr poll remote instances |
13,291 |
58.45 |
0 |
0 |
2.37 |
library cache pin |
211 |
0.00 |
0 |
1 |
0.04 |
ges global resource directory to be frozen |
9 |
100.00 |
0 |
10 |
0.00 |
wait for scn ack |
583 |
0.00 |
0 |
0 |
0.10 |
log file sequential read |
36 |
0.00 |
0 |
2 |
0.01 |
undo segment extension |
25,342 |
99.79 |
0 |
0 |
4.53 |
rdbms ipc reply |
279 |
0.00 |
0 |
0 |
0.05 |
ktfbtgex |
6 |
100.00 |
0 |
10 |
0.00 |
enq: HW - contention |
44 |
0.00 |
0 |
1 |
0.01 |
gc cr grant 2-way |
158 |
0.00 |
0 |
0 |
0.03 |
enq: TX - index contention |
1 |
0.00 |
0 |
34 |
0.00 |
enq: CF - contention |
64 |
0.00 |
0 |
1 |
0.01 |
PX Deq: Signal ACK |
37 |
21.62 |
0 |
1 |
0.01 |
latch free |
3 |
0.00 |
0 |
10 |
0.00 |
buffer busy waits |
625 |
0.16 |
0 |
0 |
0.11 |
KJC: Wait for msg sends to complete |
154 |
0.00 |
0 |
0 |
0.03 |
log buffer space |
11 |
0.00 |
0 |
2 |
0.00 |
enq: PS - contention |
46 |
0.00 |
0 |
1 |
0.01 |
enq: TM - contention |
70 |
0.00 |
0 |
0 |
0.01 |
IPC send completion sync |
40 |
100.00 |
0 |
0 |
0.01 |
PX Deq: reap credit |
1,544 |
99.81 |
0 |
0 |
0.28 |
log file single write |
36 |
0.00 |
0 |
0 |
0.01 |
enq: TT - contention |
46 |
0.00 |
0 |
0 |
0.01 |
enq: TD - KTF dump entries |
12 |
0.00 |
0 |
1 |
0.00 |
read by other session |
1 |
0.00 |
0 |
12 |
0.00 |
LGWR wait for redo copy |
540 |
0.00 |
0 |
0 |
0.10 |
PX Deq Credit: send blkd |
17 |
5.88 |
0 |
0 |
0.00 |
enq: TA - contention |
14 |
0.00 |
0 |
0 |
0.00 |
latch: ges resource hash list |
44 |
0.00 |
0 |
0 |
0.01 |
enq: PI - contention |
8 |
0.00 |
0 |
0 |
0.00 |
write complete waits |
1 |
0.00 |
0 |
2 |
0.00 |
enq: DR - contention |
3 |
0.00 |
0 |
0 |
0.00 |
enq: MW - contention |
3 |
0.00 |
0 |
0 |
0.00 |
enq: TS - contention |
3 |
0.00 |
0 |
0 |
0.00 |
PX qref latch |
150 |
100.00 |
0 |
0 |
0.03 |
enq: MD - contention |
2 |
0.00 |
0 |
0 |
0.00 |
latch: KCL gc element parent latch |
11 |
0.00 |
0 |
0 |
0.00 |
enq: JS - job run lock - synchronize |
1 |
0.00 |
0 |
1 |
0.00 |
SQL*Net more data to client |
16 |
0.00 |
0 |
0 |
0.00 |
latch: cache buffers lru chain |
1 |
0.00 |
0 |
0 |
0.00 |
enq: UL - contention |
1 |
0.00 |
0 |
0 |
0.00 |
gc current split |
1 |
0.00 |
0 |
0 |
0.00 |
enq: AF - task serialization |
1 |
0.00 |
0 |
0 |
0.00 |
latch: object queue header operation |
3 |
0.00 |
0 |
0 |
0.00 |
latch: cache buffers chains |
1 |
0.00 |
0 |
0 |
0.00 |
latch: enqueue hash chains |
2 |
0.00 |
0 |
0 |
0.00 |
SQL*Net message from client |
1,544,113 |
0.00 |
12,626 |
8 |
275.83 |
gcs remote message |
634,884 |
98.64 |
9,203 |
14 |
113.41 |
DIAG idle wait |
23,628 |
0.00 |
4,616 |
195 |
4.22 |
ges remote message |
149,591 |
93.45 |
4,612 |
31 |
26.72 |
Streams AQ: qmn slave idle wait |
167 |
0.00 |
4,611 |
27611 |
0.03 |
Streams AQ: qmn coordinator idle wait |
351 |
47.86 |
4,611 |
13137 |
0.06 |
Streams AQ: waiting for messages in the queue |
488 |
100.00 |
4,605 |
9436 |
0.09 |
virtual circuit status |
157 |
100.00 |
4,596 |
29272 |
0.03 |
PX Idle Wait |
1,072 |
97.11 |
2,581 |
2407 |
0.19 |
jobq slave wait |
145 |
97.93 |
420 |
2896 |
0.03 |
Streams AQ: waiting for time management or cleanup tasks |
1 |
100.00 |
270 |
269747 |
0.00 |
PX Deq: Parse Reply |
40 |
40.00 |
0 |
3 |
0.01 |
PX Deq: Execution Msg |
121 |
26.45 |
0 |
0 |
0.02 |
PX Deq: Join ACK |
38 |
42.11 |
0 |
1 |
0.01 |
PX Deq: Execute Reply |
34 |
32.35 |
0 |
0 |
0.01 |
PX Deq: Msg Fragment |
16 |
0.00 |
0 |
0 |
0.00 |
Streams AQ: RAC qmn coordinator idle wait |
351 |
100.00 |
0 |
0 |
0.06 |
class slave wait |
2 |
0.00 |
0 |
0 |
0.00 |
db file scattered read等待事件是當SESSION等待multi-block I/O時發生的,經過是因爲full table scans或 index fast full scans。發生過多讀操做的Segments能夠在「Segments by Physical Reads」和 「SQL ordered by Reads」節中識別(在其它版本的報告中,多是別的名稱)。若是在OLTP應用中,不該該有過多的全掃描操做,而應使用選擇性好的索引操做。
DB file sequential read等待意味着發生順序I/O讀等待(一般是單塊讀取到連續的內存區域中),若是這個等待很是嚴重,應該使用上一段的方法肯定執行讀操做的熱點SEGMENT,而後經過對大表進行分區以減小I/O量,或者優化執行計劃(經過使用存儲大綱或執行數據分析)以免單塊讀操做引發的sequential read等待。經過在批量應用中,DB file sequential read是很影響性能的事件,老是應當設法避免。
Log File Parallel Write事件是在等待LGWR進程將REDO記錄從LOG 緩衝區寫到聯機日誌文件時發生的。雖然寫操做多是併發的,但LGWR須要等待最後的I/O寫到磁盤上才能認爲並行寫的完成,所以等待時間依賴於OS完成全部請求的時間。若是這個等待比較嚴重,能夠經過將LOG文件移到更快的磁盤上或者條帶化磁盤(減小爭用)而下降這個等待。
Buffer Busy Waits事件是在一個SESSION須要訪問BUFFER CACHE中的一個數據庫塊而又不能訪問時發生的。緩衝區「busy」的兩個緣由是:1)另外一個SESSION正在將數據塊讀進BUFFER。2)另外一個SESSION正在以排它模式佔用着這塊被請求的BUFFER。能夠在「Segments by Buffer Busy Waits」一節中找出發生這種等待的SEGMENT,而後經過使用reverse-key indexes並對熱表進行分區而減小這種等待事件。
Log File Sync事件,當用戶SESSION執行事務操做(COMMIT或ROLLBACK等)後,會通知 LGWR進程將所須要的全部REDO信息從LOG BUFFER寫到LOG文件,在用戶SESSION等待LGWR返回安全寫入磁盤的通知時發生此等待。減小此等待的方法寫Log File Parallel Write事件的處理。
Enqueue Waits是串行訪問本地資源的本鎖,代表正在等待一個被其它SESSION(一個或多個)以排它模式鎖住的資源。減小這種等待的方法依賴於生產等待的鎖類型。致使Enqueue等待的主要鎖類型有三種:TX(事務鎖), TM D(ML鎖)和ST(空間管理鎖)。
Back to Wait Events Statistics
Back to Top
Event |
Waits |
%Time -outs |
Total Wait Time (s) |
Avg wait (ms) |
Waits /txn |
log file parallel write |
5,497 |
0.00 |
47 |
9 |
0.98 |
db file parallel write |
4,806 |
0.00 |
34 |
7 |
0.86 |
events in waitclass Other |
69,002 |
83.25 |
22 |
0 |
12.33 |
control file sequential read |
9,323 |
0.00 |
7 |
1 |
1.67 |
control file parallel write |
1,946 |
0.00 |
3 |
1 |
0.35 |
os thread startup |
18 |
5.56 |
2 |
89 |
0.00 |
direct path read |
138 |
0.00 |
0 |
1 |
0.02 |
db file sequential read |
21 |
0.00 |
0 |
5 |
0.00 |
direct path write |
138 |
0.00 |
0 |
0 |
0.02 |
log file sequential read |
36 |
0.00 |
0 |
2 |
0.01 |
gc cr block 2-way |
96 |
0.00 |
0 |
0 |
0.02 |
gc current block 2-way |
78 |
0.00 |
0 |
0 |
0.01 |
log buffer space |
11 |
0.00 |
0 |
2 |
0.00 |
row cache lock |
59 |
0.00 |
0 |
0 |
0.01 |
log file single write |
36 |
0.00 |
0 |
0 |
0.01 |
buffer busy waits |
151 |
0.66 |
0 |
0 |
0.03 |
gc current grant busy |
29 |
0.00 |
0 |
0 |
0.01 |
library cache lock |
4 |
0.00 |
0 |
1 |
0.00 |
enq: TM - contention |
10 |
0.00 |
0 |
0 |
0.00 |
gc current grant 2-way |
8 |
0.00 |
0 |
0 |
0.00 |
gc cr multi block request |
7 |
0.00 |
0 |
0 |
0.00 |
gc cr grant 2-way |
5 |
0.00 |
0 |
0 |
0.00 |
rdbms ipc message |
97,288 |
73.77 |
50,194 |
516 |
17.38 |
gcs remote message |
634,886 |
98.64 |
9,203 |
14 |
113.41 |
DIAG idle wait |
23,628 |
0.00 |
4,616 |
195 |
4.22 |
pmon timer |
1,621 |
100.00 |
4,615 |
2847 |
0.29 |
ges remote message |
149,591 |
93.45 |
4,612 |
31 |
26.72 |
Streams AQ: qmn slave idle wait |
167 |
0.00 |
4,611 |
27611 |
0.03 |
Streams AQ: qmn coordinator idle wait |
351 |
47.86 |
4,611 |
13137 |
0.06 |
smon timer |
277 |
6.50 |
4,531 |
16356 |
0.05 |
Streams AQ: waiting for time management or cleanup tasks |
1 |
100.00 |
270 |
269747 |
0.00 |
PX Deq: Parse Reply |
40 |
40.00 |
0 |
3 |
0.01 |
PX Deq: Join ACK |
38 |
42.11 |
0 |
1 |
0.01 |
PX Deq: Execute Reply |
34 |
32.35 |
0 |
0 |
0.01 |
Streams AQ: RAC qmn coordinator idle wait |
351 |
100.00 |
0 |
0 |
0.06 |
Back to Wait Events Statistics
Back to Top
Statistic |
Total |
NUM_LCPUS |
0 |
NUM_VCPUS |
0 |
AVG_BUSY_TIME |
101,442 |
AVG_IDLE_TIME |
371,241 |
AVG_IOWAIT_TIME |
5,460 |
AVG_SYS_TIME |
25,795 |
AVG_USER_TIME |
75,510 |
BUSY_TIME |
812,644 |
IDLE_TIME |
2,971,077 |
IOWAIT_TIME |
44,794 |
SYS_TIME |
207,429 |
USER_TIME |
605,215 |
LOAD |
0 |
OS_CPU_WAIT_TIME |
854,100 |
RSRC_MGR_CPU_WAIT_TIME |
0 |
PHYSICAL_MEMORY_BYTES |
8,589,934,592 |
NUM_CPUS |
8 |
NUM_CPU_CORES |
4 |
NUM_LCPUS:
NUM_VCPUS:
AVG_BUSY_TIME:
AVG_IDLE_TIME:
AVG_IOWAIT_TIME:
AVG_SYS_TIME:
AVG_USER_TIME:
BUSY_TIME:
IDLE_TIME:
IOWAIT_TIME:
SYS_TIME:
USER_TIME:
LOAD:
OS_CPU_WAIT_TIME:
RSRC_MGR_CPU_WAIT_TIME:
PHYSICAL_MEMORY_BYTES:
NUM_CPUS:
NUM_CPU_CORES:
總的elapsed time也能夠用以公式計算:
BUSY_TIME + IDLE_TIME + IOWAIT TIME
或:SYS_TIME + USER_TIME + IDLE_TIME + IOWAIT_TIME
Back to Wait Events Statistics
Back to Top
Service Name |
DB Time (s) |
DB CPU (s) |
Physical Reads |
Logical Reads |
ICCI |
608.10 |
496.60 |
315,849 |
16,550,972 |
SYS$USERS |
54.70 |
17.80 |
6,539 |
58,929 |
ICCIXDB |
0.00 |
0.00 |
0 |
0 |
SYS$BACKGROUND |
0.00 |
0.00 |
282 |
38,990 |
Back to Wait Events Statistics
Back to Top
Service Name |
User I/O Total Wts |
User I/O Wt Time |
Concurcy Total Wts |
Concurcy Wt Time |
Admin Total Wts |
Admin Wt Time |
Network Total Wts |
Network Wt Time |
ICCI |
59826 |
8640 |
4621 |
338 |
0 |
0 |
1564059 |
6552 |
SYS$USERS |
6567 |
3238 |
231 |
11 |
0 |
0 |
7323 |
3 |
SYS$BACKGROUND |
443 |
115 |
330 |
168 |
0 |
0 |
0 |
0 |
Back to Wait Events Statistics
Back to Top
本節按各類資源分別列出對資源消耗最嚴重的SQL語句,並顯示它們所佔統計期內所有資源的比例,這給出咱們調優指南。例如在一個系統中,CPU資源是系統性能瓶頸所在,那麼優化buffer gets最多的SQL語句將得到最大效果。在一個I/O等待是最嚴重事件的系統中,調優的目標應該是physical IOs最多的SQL語句。
在STATSPACK報告中,沒有完整的SQL語句,可以使用報告中的Hash Value經過下面語句從數據庫中查到:
select sql_text
from stats$sqltext
where hash_value = &hash_value
order by piece;
Elapsed Time (s) |
CPU Time (s) |
Executions |
Elap per Exec (s) |
% Total DB Time |
SQL Id |
SQL Module |
SQL Text |
93 |
57 |
1 |
93.50 |
14.10 |
cuidmain@HPGICCI1 (TNS V1-V3) |
insert into CUID select CUID_... |
|
76 |
75 |
172,329 |
0.00 |
11.52 |
load_fnsact@HPGICCI1 (TNS V1-V3) |
insert into ICCICCS values (:... |
|
58 |
42 |
1 |
58.04 |
8.75 |
cumimain@HPGICCI1 (TNS V1-V3) |
insert into CUMI select CUSV_... |
|
51 |
42 |
1 |
50.93 |
7.68 |
cusmmain@HPGICCI1 (TNS V1-V3) |
insert into CUSM select CUSM_... |
|
38 |
36 |
166,069 |
0.00 |
5.67 |
|
select c.name, u.name from co... |
|
35 |
3 |
1 |
35.00 |
5.28 |
SQL*Plus |
SELECT F.TABLESPACE_NAME, TO_... |
|
23 |
23 |
172,329 |
0.00 |
3.46 |
load_fnsact@HPGICCI1 (TNS V1-V3) |
insert into iccifnsact values... |
|
15 |
11 |
5 |
2.98 |
2.25 |
|
DECLARE job BINARY_INTEGER := ... |
|
14 |
14 |
172,983 |
0.00 |
2.16 |
load_fnsact@HPGICCI1 (TNS V1-V3) |
update ICCIFNSACT set BORM_AD... |
|
13 |
13 |
172,337 |
0.00 |
2.00 |
load_oldnewact@HPGICCI1 (TNS V1-V3) |
insert into OLDNEWACT values ... |
|
13 |
13 |
166,051 |
0.00 |
1.89 |
icci_migact@HPGICCI1 (TNS V1-V3) |
insert into ICCICCS values (:... |
|
10 |
4 |
1 |
9.70 |
1.46 |
cuidmain@HPGICCI1 (TNS V1-V3) |
select CUID_CUST_NO , CUID_ID_... |
|
10 |
8 |
5 |
1.91 |
1.44 |
|
INSERT INTO STATS$SGA_TARGET_A... |
|
8 |
8 |
172,329 |
0.00 |
1.25 |
load_fnsact@HPGICCI1 (TNS V1-V3) |
update ICCICCS set CCSMAXOVER... |
|
8 |
8 |
172,983 |
0.00 |
1.16 |
load_fnsact@HPGICCI1 (TNS V1-V3) |
select * from ICCIPRODCODE wh... |
Back to SQL Statistics
Back to Top
CPU Time (s) |
Elapsed Time (s) |
Executions |
CPU per Exec (s) |
% Total DB Time |
SQL Id |
SQL Module |
SQL Text |
75 |
76 |
172,329 |
0.00 |
11.52 |
load_fnsact@HPGICCI1 (TNS V1-V3) |
insert into ICCICCS values (:... |
|
57 |
93 |
1 |
57.31 |
14.10 |
cuidmain@HPGICCI1 (TNS V1-V3) |
insert into CUID select CUID_... |
|
42 |
51 |
1 |
42.43 |
7.68 |
cusmmain@HPGICCI1 (TNS V1-V3) |
insert into CUSM select CUSM_... |
|
42 |
58 |
1 |
42.01 |
8.75 |
cumimain@HPGICCI1 (TNS V1-V3) |
insert into CUMI select CUSV_... |
|
36 |
38 |
166,069 |
0.00 |
5.67 |
|
select c.name, u.name from co... |
|
23 |
23 |
172,329 |
0.00 |
3.46 |
load_fnsact@HPGICCI1 (TNS V1-V3) |
insert into iccifnsact values... |
|
14 |
14 |
172,983 |
0.00 |