db file sequential read及優化
db file sequential read:直接路徑讀;
官方說明如下:
This event signifies that the user process is reading a buffer into the SGA buffer cache and is waiting for a physical I/O call to return. A sequential read is a single-block read.
Single block I/Os are usually the result of using indexes. Rarely, full table scan calls could get truncated to a single block call because of extent boundaries, or buffers present in the buffer cache. These waits would also show up as db file sequential read.
Check the following V$SESSION_WAIT parameter columns:
?P1: The absolute file number
?P2: The block being read
?P3: The number of blocks (should be 1)
解釋:ORACLE程式需要訪問block不能從SGA中獲取的時候,因此oracle程式會等待block從I/O讀取到SGA;
一個順序讀是一個單塊讀,單塊I/O一般來自索引讀的結果;
db file sequential read等待事件有3個引數:
?P1: The absolute file number 檔案號
?P2: The block being read first block#
?P3: The number of blocks (should be 1) block數量
db file sequential read等待時間是由於執行對索引,回滾(undo)段,和表(當藉助rowid來訪問),控制檔案和資料檔案頭的單塊讀操作SQL語句(使用者和遞迴)引起的。對於這些物件的物理I/O請求是很正常的,因此db file sequential read等待的存在不是一定意味庫或應用出錯了。如果會話在這事件上花了好長事件,它可能也不是一個糟糕的事情。相反,如果會話花了大量時間在equeue或latch free上,那麼一定是有問題。
問題:AWR報告中的系統的等待事件中的db file sequential read是否合理?
根據awr報告中的以下重要引數進行解讀,以11G的awr報告為例子:
說明:db file sequential read是指sga中找不到相應的資料,所以跟buffer hit有很大的關係,當buffer hit命中率太低了,相應的db file sequential read就會高,一般buffer hit保持著95%以上;
檢視這個報告的db file sequential read的總時間和平均時間;
Foreground Wait Events也會統計db file sequential read所花費的時間和平均時間
根據SQL User I/O等待時間,檢視是否有調優的空間;
db file sequential read的優化方法:
- 從讀取開始,增加SGA中buffer cache的大小,避免每次都從硬碟中去讀數;
- 優化sql語句,減少不必要的塊讀取;
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
本文作者:JOHN
ORACLE技術部落格:ORACLE 獵人筆記 資料庫技術群:367875324 (請備註ORACLE管理 )
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12679300/viewspace-1185623/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle之 db file sequential read等待事件優化思想Oracle事件優化
- 解決db file sequential read與db file scattered read
- db file sequential read等待事件事件
- 【等待事件】db file sequential read事件
- db file sequential read 詳解
- db file scattered read與事件db file sequential read相類似(轉)事件
- 等待事件db file sequential read、db file scattered read和direct read的區別事件
- db file sequential read事件的發生事件
- 詳解 db file sequential read 等待事件事件
- High Waits on 'Db File Sequential Read'AI
- data file int write和db file sequential read個人想法
- Waiting Too Frequently for 'db file sequential read'AI
- oracle wait event之db file sequential readOracleAI
- 何時會發生db file sequential read等待事件?事件
- db file sequential read wait event等待事件之二AI事件
- 【TUNE_ORACLE】等待事件之IO等待“db file sequential read”Oracle事件
- 【kingsql分享】何時出現生db file sequential read等待事件SQL事件
- 等待事件--db file sequential reads事件
- 同一個資料塊的db file sequential read,說明了什麼?
- control file sequential read等待事件事件
- Oracle:db file scattered readOracle
- 事件:db file scattered read事件
- oracle等待事件2構造一個DB File Sequential Read等待事件和構造一個Direct Path ReadOracle事件
- db file scattered read等待事件事件
- 【等待事件】db file scattered read事件
- I/O上的等待事件 —— control file sequential read/control file parallel write事件Parallel
- 消除11.2上的db file parallel readParallel
- db file async I/O submit 等待事件優化MIT事件優化
- 0322理解db file parallel read等待事件2Parallel事件
- 0316理解db file parallel read等待事件Parallel事件
- 非空閒的等待事件-db file scattered read事件
- DB_FILE_MULTIBLOCK_READ_COUNT的設定BloC
- tatspack之十二-db file scattered read-DB檔案分散讀取
- 非空閒等待事件之:db file scattered read(轉)事件
- 【TUNE_ORACLE】等待事件之IO等待“db file scattered read”Oracle事件
- Oracle中db_file_multiblock_read_count引數探究OracleBloC
- log file sync等待事件的成因及優化方法事件優化
- 關於db_file_multiblock_read_count引數的設定BloC