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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Disable Buffering

Re: Disable Buffering

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Wed, 26 Feb 2003 23:10:38 GMT
Message-ID: <MPG.18c6e94786049cf9896cc@news.la.sbcglobal.net>


jbrenni_at_uni-muenster.de said...
> "Sybrand Bakker" <gooiditweg_at_sybrandb.demon.nl> schrieb im Newsbeitrag
> news:os0q5v01buufi34o3c24sp0jau1bkicg4v_at_4ax.com...
> > On Wed, 26 Feb 2003 17:36:10 +0100, "Jörg Brenninkmeyer"
> > <jbrenni_at_uni-muenster.de> wrote:
> >
> > > But since I want to do some queries which are
> > >based on the same table _independently_ of each other, I must at least
> empty
> > >/ override the cache between those queries. Is there a way to do this
> > >automatically? Or do I have to do some queries on a completely different
> > >table?
> > >
> > >Thanks,
> > > Jörg
> > >
> >
> > You REALLY don't know what you are talking about, do you?
> >
> > Oracle has READ CONSISTENCY. Know what that means?
> > EVERY QUERY will run INDEPENDENTLY!!!!!!!!!!!
>
> No need to get unfriendly.
>
> If I do a first query, the tables needed are loaded in the cache, if it's
> big enough. If I then run a second query, which is different, but based on
> the same tables, it can be executed just using the data which is cached from
> the first query. SO, the queries are NOT independent from each other
> REGARDING CACHING. And this is why I want to flush the cash inbetween those
> two queries. In the tests reading from disk SHOULD be an influencing factor,
> and since real data would be much more, it's quite realistic that the tables
> needed for the next query would NOT be cached for the query executed before.
>

If you want to simulate what happens the very first time Oracle sees a particular query, you could always vary your query each time it's submitted. When Oracle receives a sql statement, it first calculates a "hash" on the statement to see if it has seen the statement before (and can find it in cache).

Rather than clearing cache, just make sure the sql is different. One extra space, or any variance in digits is enough.

If you're building dynamic sql, this is easy ... just avoid using bind variables. Use literals, like "where sequence_field = 1000" then use 1001, 1002, and so on. You'll force a hard parse, and most likely not find the particular record in cache.

-- 
/Karsten
DBA > retired > DBA
Received on Wed Feb 26 2003 - 17:10:38 CST

Original text of this message

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