Sequential和Scattered的含义

6 3rd, 2010 | Posted by jacky | Filed under 大话技术

之前,我对Sequential和Scattered的理解是Oracle读取IO的顺序不同,今天又讨论起这个问题,另外一种解释是两者在内存中的保存方式有差异,Sequential read在内存中是连续的,而Scattered read是离散的。以下解释来自于Oracle文档:

Scattered read:

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 scatter-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.

Sequential read:

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. This call differs from a scattered read, because a sequential read is reading data into contiguous memory space. A sequential read is usually a single-block read.

这也从另外一个方面解释了Sequential和Scattered的含义。

–EOF–

标签:
  1. jacky
    6 3rd, 201022:22

    其实我很迷惑内存连续的确定含义,目前也没想到手段去证明。

  2. BlueBird03
    6 4th, 201002:26

    从物理磁盘读数据块到内存中,数据块的物理地址映射到内存地址。连续的物理块原则上分配的内存也是连续的。

  3. Corey
    6 4th, 201011:41

    “sequential”还有个含义就是读的时间从index到table是sequentially的
    “scattered”就是把内容scatter到buffer cache

  4. jametong
    6 23rd, 201022:29

    @BlueBird03
    Oracle的Buffer Cache分配机制无法保证这一点, 或者说保证这一点代价很大..

    相关的内容可以参考. Oracle读取操作相关等待事件的命名理由