Oracle 等待事件之 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)

On a healthy system, physical read waits should be the biggest waits after the idle waits. However, also consider whether there are db file sequential reads on a large data warehouse that should be seeing mostly full table scans with parallel query.

Figure 10-1 depicts the differences between the following wait events:

  • db file sequential read (single block read into one SGA buffer)

  • db file scattered read (multiblock read into many discontinuous SGA buffers)

  • direct read (single or multiblock read into the PGA, bypassing the SGA)

Figure 10-1 Scattered Read, Sequential Read, and Direct Path Read

wKiom1jjNvvyrXSCAAAuIt3LsAc079.png


解釋:

    db sequential read 此事件表示用戶進程正在將緩衝區讀入SGA緩衝區高速緩存並正在等待物理I / O調用返回。 順序讀取是單塊讀取


    單塊I / O通常是使用索引的結果。

全表掃描調用可能會因緩衝區高速緩存存在的範圍邊界或緩衝區而被截斷的單塊調用。 這些等待也將顯示爲db file sequential read。

    

db file sequential read的優化方法:

  1. 從讀取開始,增加SGA中buffer cache的大小,避免每次都從硬盤中去讀數;

  2. 優化sql語句,減少不必要的塊讀取;



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章