Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clearing a cached query 1

Status
Not open for further replies.

Dashley

Programmer
Dec 5, 2002
925
US
I'm trying to test and optimize a query. The first time it runs it take 38 sec's the 2nd and subsequent runs take only 4-5 sec's . Hoe can I un-cache the query so I can test it. Is there a way?

Thanks


Dan
 
Look into DBCC FREEPROCCACHE and DBCC DROPCLEANBUFFERS

“I sense many useless updates in you... Useless updates lead to fragmentation... Fragmentation leads to downtime...Downtime leads to suffering..Fragmentation is the path to the darkside.. DBCC INDEXDEFRAG and DBCC DBREINDEX are the force...May the force be with you" --
 
Hi SQLDenis


Thanks

The DBCC DROPCLEANBUFFERS idid the trick. It must be undocumeneted in the Sql Server 7 online Books because I dont see it in there but it sure did work.

Thanks again.

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top