November 26, 2018 at 9:10 am
My situation is that I don't have permissions to run DBCC dropcleanbuffers/freeproccache, but I need to find a way to indirectly clean cache on DEV server because I am tuning queries there and I need to know the impact of the changes, and I am the only one using that server.
I tried to set database offline/online but the latter one did not work, again because of my insufficient permissions.
Any other tricks that may cause cache to be cleaned?
Thanks
November 26, 2018 at 11:38 am
You shouldn't really need to completely flush the buffers. Comparing Logical I/O should be sufficient, since you can't really know what physical I/O will occur for any given query at any given time anyway. SET STATISTICS IO ON should give you that info.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
November 26, 2018 at 11:38 am
If you have permissions to create a stored procedure you could use WITH RECOMPILE
December 14, 2018 at 5:15 am
This was removed by the editor as SPAM
December 16, 2018 at 10:22 am
inshah2297 - Friday, December 14, 2018 5:15 AMYou shouldn't generally need to totally flush the cushions. Looking at Coherent I/O ought to be adequate, since you can't generally recognize what physical I/O will happen for some random question at some random time at any rate. SET Measurements IO ON should give you that data.SQL DBA,SQL Server MVP(07, 08, 09) Investigator James Blackburn, in shutting contention in the Deadly Vision murders preliminary:
On the off chance that later on, you should cry a tear, cry one for them [the murder victims]. In the event that later on, you should state a supplication, say one for them. What's more, if later on, you should light a flame, light one for them.
"SET Measurements IO ON"? :blink: Do you mean "SET STATISTICS IO ON"? And why are you copying Scott's post and then changing it with incorrect information?
--Jeff Moden
Change is inevitable... Change for the better is not.
December 17, 2018 at 10:23 am
SQL Guy 1 - Monday, November 26, 2018 9:10 AMI need to find a way to indirectly clean cache on DEV server because I am tuning queries there and I need to know the impact of the changes, and I am the only one using that server.
Don't. The query when running on production won't be running against a clean cache (hopefully), so don't test against one. Sure, you can get exaggerated improvements if you do, which looks good to management, but it's not realistic.
Run the query a couple of times, ignore the first execution as it will have the overhead of compiles and data load.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply