Solved

Disable Caching in Oracle 10g

Posted on 2011-02-11
9
1,824 Views
Last Modified: 2012-05-11
Hi All,

I was wondering if there's anyway to turn off at instance/machine level, caching in Oracle10g? I'm trying to run a series of data simulations, which requires performance analysis without caching or other optimization from Oracle.

I was wondering besides caching, is there any other things that I should disable?

Cheers
0
Comment
Question by:chongchian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
9 Comments
 
LVL 48

Accepted Solution

by:
schwertner earned 170 total points
ID: 34869806
Oracle level caches:

Oracle caches (placed in System Global area) can not be turned off. You can only increase or decrease the size of these caches.
Also you can command the size of online redo log files.


OS level caches:

On Unix the OS caches in the "free" RAM disk extents. This can not be command by you.
0
 
LVL 74

Assisted Solution

by:sdstuber
sdstuber earned 170 total points
ID: 34870802
you can flush the shared pool

for data caching,  you can't disable or flush it, but you can fill the cache with dummy data,  create a dummy table and read from it until your cache is filled with nothing but blocks from that table.

of course, restarting the database will flush everything too
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 34870811
are you sure your analysis will be valid without caching?

In normal execution, caching is regular and expected occurence.
If you artificially wipe it out, you may be creating an "even playing field" but still skewing your results.
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 160 total points
ID: 34870964
As mentioned earlier, bouncing the database is the best way to get a pristine memory structure.  Depending on exactly what you are wanting to test, in addition to flushing the shared pool, flush the buffer cache.

I agree that a cleared cache might skew your results but for testing variations of SQL performance, I flush my caches.

alter system flush shared_pool;
alter system flush buffer_cache;
0
 
LVL 48

Expert Comment

by:schwertner
ID: 34871002
Data cache flush could also be done:

alter system flush buffer_cache;

Another  cleanup statements:

alter system flush buffer_cache;

alter system switch logfile;




0
 
LVL 74

Expert Comment

by:sdstuber
ID: 34871030
>>  alter system flush buffer_cache;

I stand corrected, that's better  than trying to fill it with dummy data

I've never wanted to flush my buffer cache, so never bothered to look it up.

If anything I've wanted to seed the cache for my tests.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34871056
The only time I've ever flushed buffer cache is when I'm wanting to test variations in SQL (different hints/indexes/functions/???) and don't want any table blocks in memory between runs.

This gets even tricker in 11g with results caching.  Flushing that isn't an 'alter system'.
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 34871121
if result_cache_mode init param is set to MANUAL (the default)  nothing will be cached automatically.

and for individual queries you can use /*+ NO_RESULT_CACHE */ hint
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 34871154
also  result_cache_max_result  can bet set to 0, which should also effectively disable result caching since 0% of memory would be usable
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question