Home » SQL & PL/SQL » SQL & PL/SQL » buffers cleaning (Oracle10g)
buffers cleaning [message #319438] Sun, 11 May 2008 05:42 Go to next message
weekend79
Messages: 198
Registered: April 2005
Location: Islamabad
Senior Member

Every one of us knows that every query work relatively slow 1st time then work faster next time as its date block stores in buffers and so is its explain plan etc.

I have to test the performance of my query in my development environment so I want to clean all buffers block and explain plan and so on, before I run my query every time to note the 1st time run performance every time.

Can anyone tell me “how and which” buffers I have to clean for this goal?

Wishes

Re: buffers cleaning [message #319443 is a reply to message #319438] Sun, 11 May 2008 06:07 Go to previous messageGo to next message
Michel Cadot
Messages: 68733
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Simples way: restart the database.
Other way: alter system flush shared_pool or buffer_cache

This is the direct answer but of course this will not give you anything about the performances on production.

Regards
Michel
Re: buffers cleaning [message #319457 is a reply to message #319443] Sun, 11 May 2008 10:02 Go to previous message
William Robertson
Messages: 1643
Registered: August 2003
Location: London, UK
Senior Member
Even restarting the database might not reset things exactly as they were, since the disk array may have its own cache.
Previous Topic: Package
Next Topic: Understanding Document [PL/SQL]
Goto Forum:
  


Current Time: Mon Feb 10 03:33:43 CST 2025