Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: cache vs keep buffer pool
Hi Daud, Howard, Nuno and all,
I generally agree with what's been said but would add a couple of points.
Firstly, cache is not depreciated, it's very much alive in 9i.
From a simplistic point of view and I would suggest that the CACHE option has less 'potential for damaging performance' than the KEEP pool. What I mean by that is if we pick the wrong table to cache (either it's 1- too big to be suitable or it's 2- not used frequently enough to be suitable), the potential for damaging performance is limited. Firstly various undocumented parameters limits the "damage" for cause 1 and the natural aging process looks after the cache for cause 2. Also, if cached and if frequently used, although as Howard suggests there's no guarantee that the blocks will remain cached, there is a reasonable probability all things being equal that they do in fact stay cached. It's not so much large table scans that will cause cache tables to be aged out (as they get overwritten in the LRU portion of the LRU list) but high index activity or much reading of other cached tables.
The 'potential for damaging performance' when using the KEEP pool is that we now take over somewhat and if we don't use the keep pool appropriately, we have a fair chance of making things worse rather than better. Some of the possible issues are:
Therefore sizing the KEEP pool is hugely important. it needs to be sized 'right' (not just 'there abouts sort of').
3) Effects of infrequently used table. A 'cached' table needs to be smallish *AND* frequently used. In the default pool, an infrequently used cached table causes minimal damage in that it will age out eventually. Not so here. If we pick tables we think are going to be frequently used but are not, they sit and remain cached causing memory to be wasted. In fact if the KEEP pool doesn't account for a reasonable share of the I/Os then memory is not being utilised efficiently which hurts performance.
Therefore, it's crucial that objects assigned to the KEEP pool (and indeed the RECYCLE pool) must be appropriate.
Now I agree that a well tuned and well configured KEEP pool is most useful and has advantages over simply caching a table in the default pool. But the point I want to make is that it requires more "skill" in the DBA to set things up right. You must select the KEEP tables carefully, you must size the KEEP pool carefully and you must monitor the performance of the KEEP pool carefully.
Without being too general, some DBAs out there in real land world might struggle to with all this for which the CACHE table option might provide a simpler, more appropriate and "less dangerous" option.
My thoughts :)
Richard
"Nuno Souto" <nsouto_at_optushome.com.au> wrote in message
news:dd5cc559.0208262034.3d570450_at_posting.google.com...
> "Howard J. Rogers" <howardjr2000_at_yahoo.com.au> wrote in message
news:<3d6a8c7c_at_dnews.tpgi.com.au>...
> >
> > The cache keyword is useless. Utterly, utterly useless.
>
> And, I believe, now "deprecated"?
>
> > Which means that nasty full scans on big tables cannot possibly flush
your
> > blocks from small, useful tables -provided you direct each sort of table
to
> > different pools.
>
> Yup. In fact for large, seldom scanned tables I actually prefer to put
> them in RECYCLE. That way the scan will happen without shirting up
> KEEP or DEFAULT.
>
> > If you are on 8.0 or above, there is practically no sense in setting
> > 'CACHE'. The keep pool does it better, more reliably, and more
effectively.
> >
>
> Unless you are in the buggy point release of 8.0 that needs the CACHE
> thing to be specified to send stuff to KEEP. DAMHIKT...
>
> Cheers
> Nuno Souto
> nsouto_at_optushome.com.au
Received on Tue Aug 27 2002 - 01:21:25 CDT