Oracle Database - 'db file scattered read' wait event

> Database > Oracle Database

1 - About

db file scattered read is a wait event. It's a multiblock read into many discontinuous SGA buffers

This event signifies that the user process is reading buffers into the SGA buffer cache and is waiting for a physical I/O call to return. A db file scattered read issues a scattered read to read the data into multiple discontinuous memory locations.

A scattered read is usually a multiblock read.

It can occur for a fast full scan (of an index) in addition to a full table scan.

The db file scattered read wait event identifies that a full scan is occurring.

When performing a full scan into the buffer cache, the blocks read are read into memory locations that are not physically adjacent to each other.

Such reads are called scattered read calls, because the blocks are scattered throughout memory.

Multiblock (up to DB_FILE_MULTIBLOCK_READ_COUNT blocks) reads due to full scans into the buffer cache show up as waits for 'db file scattered read'.

Advertising

3 - V$SESSION_WAIT parameter

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 greater than 1)

4 - Differences between read events

Figure below 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)

5 - Actions

On a healthy system, physical read waits should be the biggest waits after the idle waits. However, also consider whether there are:

  • direct read waits (signifying full table scans with parallel query)
  • or db file scattered read waits on an operational (OLTP) system that should be doing small indexed accesses.

Other things that could indicate excessive I/O load on the system include the following:

  • Poor buffer cache hit ratio
  • These wait events accruing most of the wait time for a user experiencing poor response time
Advertising

6 - Support

6.1 - I'm waiting with this event

  • During a delete or update, verify that you don't have any constraint on other tables
  • Bad statistics can also lead to bad explain plan with this kind of event.
db/oracle/db_file_scattered_read.txt ยท Last modified: 2017/09/06 19:30 by gerardnico