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?
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" --
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.