If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > How do u clear Cache in SQL

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-14-06, 14:59
SoftwareSoftware SoftwareSoftware is offline
Registered User
 
Join Date: Dec 2006
Posts: 8
How do u clear Cache in SQL

How do u clear Cache in SQL

if i run a query once it takes 10 seconds and if i run the same query again it takes 1 second because it is cached. So i want to know how i can clear it because i want do some benchmarking on a query that is in cache
Reply With Quote
  #2 (permalink)  
Old 12-14-06, 15:00
Thrasymachus Thrasymachus is offline
SQL Server Street Fighter
 
Join Date: Nov 2004
Location: Down The Rabbit Hole
Posts: 7,762
DBCC DROPCLEANBUFFERS

and

DBCC FREEPROCCACHE

finally a straight forward question.
__________________
software development is where smart people go to waste their lives
Reply With Quote
  #3 (permalink)  
Old 12-14-06, 15:18
Brett Kaiser Brett Kaiser is offline
SQLTeam Scrub
 
Join Date: Nov 2002
Location: Jersey
Posts: 9,976
Why is the sky blue?
__________________
Brett
8-)

It's a Great Day for America everybody!
My Blog
My SQL Blog dbforums Yak CorralRadio 'Rita
dbForums Member List SQLTeam Member List
It's 5:00 Somewhere Pearls
The physical order of data in a database has no meaning.
Reply With Quote
  #4 (permalink)  
Old 12-14-06, 15:31
Thrasymachus Thrasymachus is offline
SQL Server Street Fighter
 
Join Date: Nov 2004
Location: Down The Rabbit Hole
Posts: 7,762
it has something to with the sun bouncing off the stuff in the air i think. yes here it is...

http://www.sciencemadesimple.com/sky_blue.html
__________________
software development is where smart people go to waste their lives

Last edited by Thrasymachus; 12-14-06 at 15:43.
Reply With Quote
  #5 (permalink)  
Old 12-14-06, 17:34
jezemine jezemine is offline
another indirection layer
 
Join Date: May 2004
Location: Seattle
Posts: 1,311
Quote:
Originally Posted by Brett Kaiser
Why is the sky blue?
that's one I know!

sunlight is scattered by the atmosphere predominantly by Rayleigh scattering, which is light scattering by electric dipoles. it's much stronger at higher frequencies (that is, the higher the frequency, the more light is scattered). It's actually quite a strong dependence, goes like freq^4.

Since all the molecules in the atmosphere scatter the blue end of the spectrum much more strongly than the red, the sky is blue. It's bluest at 90 degrees between you and the sun because dipole scattering is strongest there.
__________________
elsasoft.org
Reply With Quote
  #6 (permalink)  
Old 07-02-09, 03:00
nitin.kumar.be nitin.kumar.be is offline
Registered User
 
Join Date: Jul 2009
Posts: 3
Thumbs up clearing the query cache in sql server

Clearing the query cache in sql server is pretty simple. It helps you at the time of checking the query performance in sql server. I think the following article will help you to clear query cache in SQL Server.

How to Clear Query Cache in SQL Server
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On