Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: sequential read on full-table scan?
In Chapter 5: Interpreting Common I/O Related Wait Events of 'Oracle
Wait Interface: A Practical Guide to Performance Diagnostics & Tuning'
book, authors have explained, 'Why Does db file sequential read event
Show Up in a Full Table Scan Operation'
If you trace or monitor a full table scan operation closely, you may
find db file sequential read events sandwiched between db file
scattered read events. This may or may not be a problem depending on
the circumstance of the single-block read. Following are the four
primary reasons why you see db file sequential read events in a full
scan operation.
=A7=09Extent boundary When the last set of blocks in an extent is only 1
block, Oracle fetches that block with a single-block read call. This
is normally not a problem unless your extent size is too small.
Following is an event 10046 trace file that shows db file sequential
read events embedded in a full table scan operation. The table block
size is 8K, the MBRC is 8 blocks, and the extent size is 72K (9
blocks). A full table scan against the table will result in many db
file sequential read events if the table is large. If this is the
case, the full table scan operation will complete faster if the table
is rebuilt with a larger extent size.
WAIT #1: nam=3D'db file scattered read' ela=3D 470 p1=3D7 p2=3D18 p3=3D8 WAIT #1: nam=3D'db file sequential read' ela=3D 79 p1=3D7 p2=3D26 p3=3D1 WAIT #1: nam=3D'db file scattered read' ela=3D 459 p1=3D7 p2=3D27 p3=3D8 WAIT #1: nam=3D'db file sequential read' ela=3D 82 p1=3D7 p2=3D35 p3=3D1 WAIT #1: nam=3D'db file scattered read' ela=3D 466 p1=3D7 p2=3D36 p3=3D8 WAIT #1: nam=3D'db file sequential read' ela=3D 79 p1=3D7 p2=3D44 p3=3D1 WAIT #1: nam=3D'db file scattered read' ela=3D 460 p1=3D7 p2=3D45 p3=3D8 WAIT #1: nam=3D'db file sequential read' ela=3D 60 p1=3D7 p2=3D53 p3=3D1 WAIT #1: nam=3D'db file scattered read' ela=3D 779 p1=3D7 p2=3D54 p3=3D8 WAIT #1: nam=3D'db file sequential read' ela=3D 78 p1=3D7 p2=3D62 p3=3D1. . .
=A7=09
-- Explain plan
LVL OPERATION OBJECT
--- ---------------------- -------------------1 INSERT STATEMENT=20
SID EVENT TIME_WAITED --- ------------------------------ ----------- 7 SQL*Net message from client 5 7 latch free 11 7 log file switch completion 155 7 log buffer space 205 7 log file sync 467 7 db file scattered read 1,701=20 7 db file sequential read 185,682
On 5/21/05, Wolfgang Breitling <breitliw_at_centrexcc.com> wrote:
> OOps, in case anyone wonders how I come to a cost calculation of 1152/16
> and 1152/3 for a 1024 block table. The explanation is that I had started
> with 1024 but by the time I got to 1024/3=3D341.33333 I thought it would =
be
> simpler to avoid the decimals and switched the calculations to a 1152 blo=
ck
> table, except I forgot to make that change in the first line.
>=20
>=20> >with a real mbrc of 3: cost of FTS =3D 1152/3 =3D 384 ( + 1 for
> >e.g. for a table of 1024 blocks
> >
> >with a dfmrc of 16: cost of FTS =3D 1152/16 =3D 72 ( + 1 for
> >_table_scan_cost_plus_one =3D true) =3D 73
>=20
>=20
>=20
--=20
Best Regards,
Jaffar, OCP DBA
Banque Saudi Fransi
Saudi Arabia
---------------------------------------------------------------------------=
-- http://www.freelists.org/webpage/oracle-lReceived on Sun May 22 2005 - 05:00:13 CDT
![]() |
![]() |