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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Currval and buffer gets

Re: Currval and buffer gets

From: Danisment Gazi Unal <dunal_at_ubTools.com>
Date: Tue, 23 Apr 2002 03:53:34 -0800
Message-ID: <F001.0044C3F9.20020423035334@fatcity.com>


Hello Gaja,

Here is the line to talk about:

FETCH #1:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=4,tim=5656332

As we see, cu+cr=0 and returned raw is r=1. Normally, it's not possible to return a raw without touching a block. But there are some cases such as X$ tables that these statistics are zero.

I had tested V$SESSION, V$PROCESS and I had seen logical IO is 0 since they are based on X$ tables.

I did not document it, but I think, Oracle doesn't account logical IO for X$ tables. Also, How can Oracle account it in blocks ? X$ tables are not organized in DB_BLOCK_SIZE.

I may be wrong, I've not done detailed tests on this issue. I'm looking forward to hearing a confirmation on that.

regards...

Gaja Krishna Vaidyanatha wrote:

> Hi Dan and list,
>
> Here is the output from a test after setting 10046 at
> level 12. Please tell me whether this is really 0 or
> not accounted for. If it is not accounted for, then I
> stand corrected.
>
> Thanks,
>
> Gaja
>
> ----Trace file output starts here----
> *** 2002-04-22 16:04:14.090
> *** SESSION ID:(11.752) 2002-04-22 16:04:14.060
> =====================
> PARSING IN CURSOR #1 len=70 dep=0 uid=0 oct=42 lid=0
> tim=5655178 hv=347037164 ad='51d70a0'
> alter session set events '10046 trace name context
> forever, level 12'
> END OF STMT
> EXEC
> #1:c=2,e=4,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=5655179
> WAIT #1: nam='SQL*Net message to client' ela= 0
> p1=1111838976 p2=1 p3=0
> *** 2002-04-22 16:04:25.617
> WAIT #1: nam='SQL*Net message from client' ela= 1152
> p1=1111838976 p2=1 p3=0
> =====================
> PARSING IN CURSOR #1 len=21 dep=0 uid=0 oct=3 lid=0
> tim=5656331 hv=2119980703 ad='51d5564'
> select * from x$dual
> END OF STMT
> PARSE
> #1:c=0,e=0,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=4,tim=5656331
> BINDS #1:
> EXEC
> #1:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=5656332
> WAIT #1: nam='SQL*Net message to client' ela= 0
> p1=1111838976 p2=1 p3=0
> FETCH
> #1:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=4,tim=5656332
> WAIT #1: nam='SQL*Net message from client' ela= 2
> p1=1111838976 p2=1 p3=0
> FETCH
> #1:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=5656334
> WAIT #1: nam='SQL*Net message to client' ela= 0
> p1=1111838976 p2=1 p3=0
> WAIT #1: nam='SQL*Net message from client' ela= 815
> p1=1111838976 p2=1 p3=0
> STAT #1 id=1 cnt=1 pid=0 pos=0 obj=0 op='FIXED TABLE
> FULL X$DUAL '
> =====================
> ----Trace file output ends here----
>
> --- Danisment Gazi Unal <dunal_at_ubTools.com> wrote:
> > Hello Gaja,
> >
> > am I missing something ?
> >
> > is it 0 logical IO indeed ? or it's not accounted
> > for X$ tables ?
> >
> > regards...
> >
> >
> >
> > Gaja Krishna Vaidyanatha wrote:
> >
> > > 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 <adaryechiel_at_hotmail.com> 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: adaryechiel_at_hotmail.com
> > > >
> > > > 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: ListGuru_at_fatcity.com (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: oraperfman_at_yahoo.com
> > >
> > > 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: ListGuru_at_fatcity.com (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).
> >
> > --
> > Danisment Gazi Unal
> > http://www.ubTools.com
> >
> >
> > --
> > Please see the official ORACLE-L FAQ:
> > http://www.orafaq.com
> > --
> > Author: Danisment Gazi Unal
> > INET: dunal_at_ubTools.com
> >
> > 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: ListGuru_at_fatcity.com (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: oraperfman_at_yahoo.com
>
> 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: ListGuru_at_fatcity.com (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).

--
Danisment Gazi Unal
http://www.ubTools.com



-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Danisment Gazi Unal
  INET: dunal_at_ubTools.com

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: ListGuru_at_fatcity.com (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).
Received on Tue Apr 23 2002 - 06:53:34 CDT

Original text of this message

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