Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> sequential read on full-table scan?

sequential read on full-table scan?

From: Paul Baumgartel <paul.baumgartel_at_gmail.com>
Date: Fri, 20 May 2005 12:24:26 -0400
Message-ID: <f8c4771050520092439a5a548@mail.gmail.com>


I am tracking a process that's exhibiting what I consider odd behavior. This is 9.2.0.4.0 on Windows.

A stored procedure is executing a loop in which it performs a cursor fetch, then updates the same table based on data in the fetch:

SELECT SUM(OPTIONS_VESTED) SUM_VESTED,SUM(ACTUAL_FORFEITURE) SUM_FORFEITED FROM OE_LINEITEM_RPT WHERE GRANT_DT =3D :b1 AND PLAN_ID =3D :b2 AND PLAN_SORT =3D:b3 AND OPT_PRC =3D :b4 AND EXPIRATION_DT =3D :b5 AND FAS123_QUAL_CODE =3D :b6 AND RUNTIME_ID =3D :b7= .

followed by=20

UPDATE /*+ rule */OE_LINEITEM_RPT R SET FAS123_TURNOVER=3DROUND(:b1 / DECODE(:b2,0,1,:b2) * 100 ,4) WHERE R.GRANT_DT =3D :b4 AND R.PLAN_ID =3D
:b5 AND R.PLAN_SORT =3D :b6 AND R.OPT_PRC =3D :b7 AND R.EXPIRATION_DT =
=3D
:b8 AND R.FAS123_QUAL_CODE =3D :b9 AND R.RUNTIME_ID =3D :b10

I don't know the reason for the RULE hint. There are NO indexes on the table OE_LINEITEM_RPT. Now here's the odd part: v$session_wait (and statspack reports) show that the process is spending 80% of its time waiting for db file sequential read of 1 block from the table.=20 Why in the world would Oracle be reading a block at a time rather than performing full-table scans?

--=20
Paul Baumgartel
paul.baumgartel_at_gmail.com

--
http://www.freelists.org/webpage/oracle-l
Received on Fri May 20 2005 - 12:29:18 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US