DB Name DB Id Instance Inst Num Release Cluster Host
------------ ----------- ------------ -------- ----------- ------- ------------
LIXORA 1409317108 LIXORA 1 9.2.0.1.0 NO lixora-DATA
Snap Id Snap Time Sessions Curs/Sess Comment
------- ------------------ -------- --------- -------------------
Begin Snap: 52 06-8月 -15 09:35:04 107 110.9
End Snap: 53 06-8月 -15 09:49:47 112 106.5
Elapsed: 14.72 (mins)
% Blocks changed per Read: 0.22 Recursive Call %: 70.00
Rollback per transaction %: 79.27 Rows per Sort: 2161.38
Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Buffer Nowait %: 99.54 Redo NoWait %: 100.00
Buffer Hit %: 97.66 In-memory Sort %: 93.03
Library Hit %: 98.20 Soft Parse %: 87.35
Execute to Parse %: 92.04 Latch Hit %: 98.16
Parse CPU to Parse Elapsd %: 19.16 % Non-Parse CPU: 95.76
Shared Pool Statistics Begin End
------ ------
Memory Usage %: 86.21 86.82
% SQL with executions>1: 52.42 54.94
% Memory for SQL w/exec>1: 49.55 51.72
Top 5 Timed Events
~~~~~~~~~~~~~~~~~~ % Total
Event Waits Time (s) Ela Time
-------------------------------------------- ------------ ----------- --------
direct path read 40,202 8,654 51.85
buffer busy waits 28,721 2,001 11.99
db file sequential read 26,887 1,997 11.97
enqueue 553 1,702 10.20
db file scattered read 22,423 1,661 9.95
-------------------------------------------------------------
Wait Events for DB: LIXORA Instance: LIXORA Snaps: 52 -53
-> s - second
-> cs - centisecond - 100th of a second
-> ms - millisecond - 1000th of a second
-> us - microsecond - 1000000th of a second
-> ordered by wait time desc, waits desc (idle events last)
Avg
Total Wait wait Waits
Event Waits Timeouts Time (s) (ms) /txn
---------------------------- ------------ ---------- ---------- ------ --------
direct path read 40,202 0 8,654 215 18.4
buffer busy waits 28,721 16 2,001 70 13.2
db file sequential read 26,887 0 1,997 74 12.3
enqueue 553 553 1,702 3078 0.3
db file scattered read 22,423 0 1,661 74 10.3 log file sync 493 4 111 224 0.2
direct path write 1,588 0 100 63 0.7
control file parallel write 243 0 99 408 0.1 log file parallel write 508 439 86 169 0.2
db file parallel write 342 171 80 233 0.2
control file sequential read 318 0 16 51 0.1
library cache pin 118 0 8 67 0.1
library cache load lock 6 2 6 1060 0.0
latch free 679 625 0 1 0.3
row cache lock 5 0 0 17 0.0
SQL*Net more data to client 871 0 0 0 0.4
SQL*Net break/reset to clien 26 0 0 0 0.0
LGWR wait for redo copy 1 0 0 0 0.0
SQL*Net message from client 69,253 0 20,459 295 31.8
virtual circuit status 28 28 840 29999 0.0
SQL*Net message to client 69,269 0 0 0 31.8
SQL*Net more data from clien 21 0 0 0 0.0
-------------------------------------------------------------
Background Wait Events for DB: LIXORA Instance: LIXORA Snaps: 52 -53
-> ordered by wait time desc, waits desc (idle events last)
--‘Response Time‘ components:---
CPU time =49.2%
direct path read =26.7%
db file sequential read =7.3%
enqueue =6.9%
db file scattered read =3.9%
buffer busy waits =2.1%
对statspack 详细分析后发现,系统的服务时间占用了49.2%,而cpu的高开销,
也从一个侧面表明,应用存在大开销cpu 的操作,这类操作一般可能是排序,或者大量硬解析,
但是top event里并没有看到shared pool 相关的等待事件。
继续看下 SQL ordered by Gets
CPU Elapsd
Buffer Gets Executions Gets per Exec %Total Time (s) Time (s) Hash Value
--------------- ------------ -------------- ------ -------- --------- ----------
333,146 7 47,592.3 2.6 43.73 ######### 3804332362
select count(0) from (select LIXORA_QX.*,(SELECT YQLB FROM LIXORA_QX
YQ WHERE LIXORA_HLJ.SEQ_NUMBER = LIXORA_QX.DQYQXH) AS YQLB from T_S
B_QX where (1=1) order by C_DATE) --果然存在一个排序操作