解析4-4 對(duì)于常見的一些IDLE wait事件舉例: dispatcher timer lock element cleanup Null event parallel query dequeue wait parallel query idle wait - Slaves pipe get PL/SQL lock timer pmon timer- pmon rdbms ipc message slave wait smon timer SQL*Net break/reset to client SQL*Net message from client SQL*Net message to client SQL*Net more data to client virtual circuit status client message SQL*Net message from client 下面是關(guān)于這里的常見的等待事件和解決方法的一個(gè)快速預(yù)覽 等待事件 一般解決方法 Sequential Read 調(diào)整相關(guān)的索引和選擇合適的驅(qū)動(dòng)行源 Scattered Read 表明出現(xiàn)很多全表掃描。優(yōu)化code,cache小表到內(nèi)存中。 Free Buffer 增大DB_CACHE_SIZE,增大checkpoint的頻率,優(yōu)化代碼 Buffer Busy Segment header 增加freelist或者freelistgroups Buffer Busy Data block 隔離熱塊;使用反轉(zhuǎn)索引;使用更小的塊;增大表的initrans Buffer Busy Undo header 增加回滾段的數(shù)量或者大小 Buffer Busy Undo block Commit more;增加回滾段的數(shù)量或者大小 Latch Free 檢查具體的等待latch類型,解決方法參考后面介紹 Enqueue–ST 使用本地管理的表空間或者增加預(yù)分配的盤區(qū)大小 Enqueue–HW 在HWM之上預(yù)先分配盤區(qū) Enqueue–TX4 在表或者索引上增大initrans的值或者使用更小的塊 Log Buffer Space 增大LOG_BUFFER,改善I/O Log File Switch 增加或者增大日志文件 Log file sync 減小提交的頻率;使用更快的I/O;或者使用裸設(shè)備 Write complete waits 增加DBWR;提高CKPT的頻率;
|