请求的时间。如果这个等待比较严重,可以通过将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
Background Wait Events
?
ordered by wait time desc, waits desc (idle events last)
%Time -outs 0.00 0.00 83.25 0.00 0.00 5.56 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.66 0.00 0.00 0.00 0.00 0.00 0.00 73.77 Total Wait Time (s) 47 34 22 7 3 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 50,194 Avg wait (ms) 9 7 0 1 1 89 1 5 0 2 0 0 2 0 0 0 0 1 0 0 0 0 516 Waits /txn 0.98 0.86 12.33 1.67 0.35 0.00 0.02 0.00 0.02 0.01 0.02 0.01 0.00 0.01 0.01 0.03 0.01 0.00 0.00 0.00 0.00 0.00 17.38 Event log file parallel write db file parallel write events in waitclass Other control file sequential read control file parallel write os thread startup direct path read db file sequential read direct path write log file sequential read gc cr block 2-way gc current block 2-way log buffer space row cache lock log file single write buffer busy waits gc current grant busy library cache lock enq: TM - contention gc current grant 2-way gc cr multi block request gc cr grant 2-way rdbms ipc message Waits 5,497 4,806 69,002 9,323 1,946 18 138 21 138 36 96 78 11 59 36 151 29 4 10 8 7 5 97,288 gcs remote message DIAG idle wait pmon timer ges remote message Streams AQ: qmn slave idle wait Streams AQ: qmn coordinator idle wait smon timer Streams AQ: waiting for time management or cleanup tasks PX Deq: Parse Reply PX Deq: Join ACK PX Deq: Execute Reply Streams AQ: RAC qmn coordinator idle wait Back to Wait Events Statistics Back to Top
634,886 23,628 1,621 149,591 167 351 277 1 40 38 34 351 98.64 0.00 100.00 93.45 0.00 47.86 6.50 100.00 40.00 42.11 32.35 100.00 9,203 4,616 4,615 4,612 4,611 4,611 4,531 270 0 0 0 0 14 195 2847 31 27611 13137 16356 269747 3 1 0 0 113.41 4.22 0.29 26.72 0.03 0.06 0.05 0.00 0.01 0.01 0.01 0.06 Operating System Statistics
Statistic 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 NUM_CPUS NUM_CPU_CORES Total 0 0 101,442 371,241 5,460 25,795 75,510 812,644 2,971,077 44,794 207,429 605,215 0 854,100 0 8 4 PHYSICAL_MEMORY_BYTES 8,589,934,592 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: 如果显示0,是因为没有设置LPARS
同上。
BUSY_TIME / NUM_CPUS IDLE_TIME / NUM_CPUS IOWAIT_TIME / NUM_CPUS SYS_TIME / NUM_CPUS
USER_TIME / NUM_CPUSar o
time equiv of %usr+%sys in sar output time equiv of %idle in sar time equiv of %wio in sar time equiv of %sys in sar
USER_TIME: time equiv of %usr in sar LOAD: 未知
OS_CPU_WAIT_TIME: supposedly time waiting on run queues
RSRC_MGR_CPU_WAIT_TIME: time waited coz of resource manager PHYSICAL_MEMORY_BYTES: total memory in use supposedly NUM_CPUS: number of CPUs reported by OS NUM_CPU_CORES: number of CPU sockets on motherboard 总的elapsed time也可以用以公式计算: BUSY_TIME + IDLE_TIME + IOWAIT TIME
或:SYS_TIME + USER_TIME + IDLE_TIME + IOWAIT_TIME (因为BUSY_TIME = SYS_TIME+USER_TIME)
Back to Wait Events Statistics Back to Top
Service Statistics
?
ordered by DB Time
DB Time (s) DB CPU (s) Physical Reads Logical Reads 608.10 54.70 0.00 0.00 496.60 17.80 0.00 0.00 315,849 6,539 0 282 16,550,972 58,929 0 38,990 Service Name ICCI SYS$USERS ICCIXDB SYS$BACKGROUND Back to Wait Events Statistics Back to Top
Service Wait Class Stats
? ? ?
Wait Class info for services in the Service Statistics section.
Total Waits and Time Waited displayed for the following wait classes: User I/O, Concurrency, Administrative, Network
Time Waited (Wt Time) in centisecond (100th of a second)
User I/O Total Wts 59826 6567 443 Service Name ICCI SYS$USERS SYS$BACKGROUND User I/O Wt Time 8640 3238 115 Concurcy Total Wts 4621 231 330 Concurcy Wt Time 338 11 168 Admin Total Wts 0 0 0 Admin Wt Time 0 0 0 Network Total Wts 1564059 7323 0 Network Wt Time 6552 3 0 Back to Wait Events Statistics Back to Top
SQL Statistics
? ? ? ? SQL ordered by Elapsed Time SQL ordered by CPU Time SQL ordered by Gets SQL ordered by Reads ? ? ? ? ? ? SQL ordered by Executions SQL ordered by Parse Calls SQL ordered by Sharable Memory SQL ordered by Version Count SQL ordered by Cluster Wait Time Complete List of SQL Text 本节按各种资源分别列出对资源消耗最严重的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;
Back to Top
SQL ordered by Elapsed Time
? ?
Resources reported for PL/SQL code includes the resources used by all SQL statements called by the code.
% Total DB Time is the Elapsed Time of the SQL statement divided into the Total Database Time multiplied by 100
% Elap Totaper l DB ExeTimc (s) e Elapsed Time (s) 93 76 58 51 38 35 CPU ExecutionTims e (s) 57 75 42 42 36 3 SQL Id SQL Module SQL Text 1 93.50 14.10 d8z0u8hgj8xdy cuidmain@HPGICCI1 (TNS V1-V3) 172,329 0.00 11.52 4vja2k2gdtyup load_fnsact@HPGICCI1 (TNS V1-V3) 8.75 569r5k05drsj7 cumimain@HPGICCI1 (TNS V1-V3) 7.68 ackxqhnktxnbc cusmmain@HPGICCI1 (TNS V1-V3) 5.67 7gtztzv329wg0 5.28 6z06gcfw39pkd SQL*Plus insert into CUID select CUID_... insert into ICCICCS values (:... insert into CUMI select CUSV_... insert into CUSM select CUSM_... select c.name, u.name from co... SELECT F.TABLESPACE_NAME, TO_... insert into iccifnsact values... DECLARE job BINARY_INTEGER := ... update ICCIFNSACT set BORM_AD... insert into OLDNEWACT values ... insert into ICCICCS values (:... select CUID_CUST_NO , CUID_ID_... 1 58.04 1 50.93 166,069 0.00 1 35.00 23 15 14 13 13 10 23 11 14 13 13 4 172,329 5 172,983 172,337 166,051 1 0.00 2.98 0.00 0.00 0.00 9.70 3.46 1dm3bq36vu3gload_fnsact@HPGICCI1 8 (TNS V1-V3) 2.25 djs2w2f17nw2z 2.16 7wwv1ybs9zguload_fnsact@HPGICCI1 z (TNS V1-V3) 2.00 gmn2w09rdxn1load_oldnewact@HPGIC4 CI1 (TNS V1-V3) 1.89 chjmy0dxf9mbj icci_migact@HPGICCI1 (TNS V1-V3) 1.46 0yv9t4qb1zb2b cuidmain@HPGICCI1 (TNS V1-V3) 10 8 5 1.91 1.44 1crajpb7j5tyz INSERT INTO STATS$SGA_TARGET_A... update ICCICCS set CCSMAXOVER... select * from ICCIPRODCODE wh... 8 8 8 8 172,329 172,983 0.00 0.00 1.25 38apjgr0p55ns load_fnsact@HPGICCI1 (TNS V1-V3) 1.16 5c4qu2zmj3guload_fnsact@HPGICCI1 x (TNS V1-V3) Back to SQL Statistics
Back to Top
SQL ordered by CPU Time
? ?
Resources reported for PL/SQL code includes the resources used by all SQL statements called by the code.
% Total DB Time is the Elapsed Time of the SQL statement divided into the Total Database Time multiplied by 100
% CPU Totaper l DB ExeTimc (s) e CPU Time (s) 75 57 42 42 36 23 14 13 13 11 8 8 Elapsed Time (s) 76 93 51 58 38 23 14 13 13 15 8 10 Executions 172,329 SQL Id SQL Module SQL Text 0.00 11.52 4vja2k2gdtyup load_fnsact@HPGICCI1 (TNS V1-V3) insert into ICCICCS values (:... insert into CUID select CUID_... insert into CUSM select CUSM_... insert into CUMI select CUSV_... select c.name, u.name from co... insert into iccifnsact values... update ICCIFNSACT set BORM_AD... insert into OLDNEWACT values ... insert into ICCICCS values (:... DECLARE job BINARY_INTEGER := ... update ICCICCS set CCSMAXOVER... INSERT INTO STATS$SGA_TARGET_A... select * from ICCIPRODCODE wh... select CUID_CUST_NO , CUID_ID_... SELECT F.TABLESPACE_NAME, TO_... 1 57.31 14.10 d8z0u8hgj8xdy cuidmain@HPGICCI1 (TNS V1-V3) 1 42.43 1 42.01 166,069 172,329 172,983 172,337 166,051 5 172,329 5 0.00 0.00 0.00 0.00 0.00 2.23 0.00 1.60 7.68 ackxqhnktxnbc cusmmain@HPGICCI1 (TNS V1-V3) 8.75 569r5k05drsj7 cumimain@HPGICCI1 (TNS V1-V3) 5.67 7gtztzv329wg0 3.46 1dm3bq36vu3gload_fnsact@HPGICCI1 8 (TNS V1-V3) 2.16 7wwv1ybs9zguload_fnsact@HPGICCI1 z (TNS V1-V3) 2.00 gmn2w09rdxn1load_oldnewact@HPGIC4 CI1 (TNS V1-V3) 1.89 chjmy0dxf9mbj icci_migact@HPGICCI1 (TNS V1-V3) 2.25 djs2w2f17nw2z 1.25 38apjgr0p55ns load_fnsact@HPGICCI1 (TNS V1-V3) 1.44 1crajpb7j5tyz 8 4 3 8 10 35 172,983 1 1 0.00 3.54 3.13 1.16 5c4qu2zmj3guload_fnsact@HPGICCI1 x (TNS V1-V3) 1.46 0yv9t4qb1zb2b cuidmain@HPGICCI1 (TNS V1-V3) 5.28 6z06gcfw39pkd SQL*Plus Back to SQL Statistics Back to Top
SQL ordered by Gets