Thread: How to clear buffer cache for performance tuning


Permlink Replies: 4 - Pages: 1 - Last Post: Aug 28, 2006 11:36 AM Last Post By: Kevin Krause
hzhang@siebel.com

Posts: 1
Registered: 06/17/02
How to clear buffer cache for performance tuning
Posted: Jun 17, 2002 12:07 PM
Click to report abuse...   Click to reply to this thread Reply
I am doing performance tuning, after the first run, the data is loaded into buffer cache, so the second run will take shorter time, my question is, how to clear the buffer cache so the second run can be compared at the same basis with the first run? Maybe this is too simple for you, but I am new in this area, please help.
vasuhg

Posts: 2
Registered: 02/14/00
re:How to clear buffer cache for performance tuning
Posted: Jun 18, 2002 1:28 PM   in response to: hzhang@siebel.com in response to: hzhang@siebel.com
Click to report abuse...   Click to reply to this thread Reply
Find out the tables (and the tables behind the views) that the data in the buffer cache is loaded from. Using this info, get the tablespaces these tables belong to. Bring these offline - 'ALTER TABLESPACE <tablespace_name> OFFLINE;' for all the tablespaces. And bring them online - 'ALTER TABLESPACE <tablespace_name> ONLINE;' for all the tablespaces. This will invlidate all the blocks belonging to the above tablespaces.
sikandar_h

Posts: 30
Registered: 06/08/00
re:How to clear buffer cache for performance tuning
Posted: Aug 25, 2002 3:04 AM   in response to: vasuhg in response to: vasuhg
Click to report abuse...   Click to reply to this thread Reply
Shutdown and start the db as it will clear all the SGA.
user527295

Posts: 1
Registered: 08/27/06
Re: How to clear buffer cache for performance tuning
Posted: Aug 27, 2006 6:43 PM   in response to: hzhang@siebel.com in response to: hzhang@siebel.com
Click to report abuse...   Click to reply to this thread Reply
Try this running this...you should only do this against a test db.

ALTER SYSTEM FLUSH BUFFER_CACHE;

Cheers, Jon
Kevin Krause

Posts: 505
Registered: 08/15/00
Re: How to clear buffer cache for performance tuning
Posted: Aug 28, 2006 11:36 AM   in response to: hzhang@siebel.com in response to: hzhang@siebel.com
Click to report abuse...   Click to reply to this thread Reply
take your results with a grain of salt. Remember in the "real world", your system may have some of these blocks cached, stats may be different, the planets may not be aligned.

Try to validate your performance tweaks in an environment that is as close as possible to your production system.
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums