My Blog

June 5, 2007

db file sequential read & db file scattered read

Filed under: Oracle — by enotebook @ 1:53 pm

Why is a random-access operation known as “db file sequential read” and a sequential-access operation known as “db file scattered read”?
But the wait-events are named more for the way that the I/O calls themselves are made, rather than for their footprint on the I/O subsystem. The random-access single-block reads are performed sequentially one right after another, synchronously. This is because the descent, from root to branch to leaf, of a tree-structure hierarchy is a performed by reading a block in order to find out where to go next. Thus, we cannot read several blocks together, because it is possible that the next node we will visit will be behind us. Hence, the naming with the word sequential, since we have to progress sequentially from one block to another.

On the other hand, when performing sequential-access multi-block reads for a FULL table-scan, there is no unpredictability involved. We know exactly which blocks we are going to access, so the only question is getting them all read quickly enough. To do that, we can employ parallel processing and asynchronous operations. Hence the naming with the word scattered, since we can scatter dozens or hundreds of I/O requests to the operating system, and just sort the results when we get them back.

Blog at