Hi Yechiel,

Any full-table-scan in Oracle 8i (or below) consumes 4
LIOs to the segment header. This number has reduced to
2 in 9i. Given that the 1 row that you are going after
is in 1 data block, there is 1 LIO for the data block
itself, given you a total of 5 LIOs. You can verify
this by setting 10046 for the session and looking at
the trace output.

The workaround is to reference x$dual in your
application. Alternatively, you can create a view on
x$dual, create a synonym for it and then go from
there. You will incur some I/O for the first access of
the query (with the synonym), but subsequent accesses
will incur 0 LIOs against x$dual.

Cheers,

Gaja
--- Yechiel Adar <[EMAIL PROTECTED]> wrote:
> I did two statspack snapshots, one hour and forty
> minutes apart.
> Then I generated a report and loaded it into
> oraperf.com.
> In the report I saw that the two SQL statements that
> where executed the most
> times where:
> 
> Select xxxx.currval from dual;
> 
> Select xxxx.nextval from dual;.
> 
> Each one was executed about 90,000 times with 5
> buffer gets per execution.
> The net result was about 950,000 buffer get for
> nextval and currval.
> 
> My question is:
> Why should there be about 5 buffer gets per
> execution?
> 
> Yechiel Adar
> Mehish
> -- 
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> -- 
> Author: Yechiel Adar
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- (858) 538-5051  FAX:
> (858) 538-5051
> San Diego, California        -- Public Internet
> access / Mailing Lists
>
--------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from).  You may
> also send the HELP command for other information
> (like subscribing).


=====
Gaja Krishna Vaidyanatha
Director, Storage Management Products,
Quest Software, Inc.
Co-author - Oracle Performance Tuning 101
http://www.osborne.com/database_erp/0072131454/0072131454.shtml

__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Gaja Krishna Vaidyanatha
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to