December 29, 2004 at 5:46 pm
Some time ago I recall reading a post about how you could clear QA after executing a query. Basically if you run the same query twice, it runs the second time much faster than the first. I would appreciate being reminded of what to execute so that the query takes the same amount of time.
Thanks you,
DB
December 30, 2004 at 1:21 am
The second time it usually runs faster, because the execution plan is cached and reused. To start with the same condition do
DBCC DROPCLEANBUFFERS
DBCC FREEPROCCACHE
You might NOT want to do this on a production server.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 30, 2004 at 9:23 am
Thank you Frank. Just what I was looking for!
Happy New Year!
Deborah
December 30, 2004 at 9:33 am
Actually... I have three queries that I am comparing. I have been running them with those two commands in between over an over. I get different times each time (for each select). Not radical - between 22 and 25 secs. Is there anything else I can execute so that I can get the same time each time? I am running on my own sql server - no one else is accessing my machine and I am not running anything else (that is doing anything at the moment anyway) on my machine.
Thanks - DB
January 4, 2005 at 7:55 am
Be sure to run "CHECKPOINT" before dropping the cleanbuffers. Otherwise it may not have the desired effect.
January 4, 2005 at 9:39 am
Thanks. That seems to help.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply