July 23, 2012 at 6:17 am
I'm using one query window and trying to tune the Query, if i runs twice or thrice it's taking Old execution plan and Cash,So before executing query what are the DBCC commands?, should i follow and clear on current sessions?
July 23, 2012 at 6:23 am
Hi Saravanan,
Use DBCC DROPCLEANBUFFERS to test queries with a cold buffer cache without shutting down and restarting the server. DBCC DROPCLEANBUFFERS serves to empty the data cache.
Regards,
Karthik.
Regards,
Karthik.
SQL Developer.
July 23, 2012 at 6:25 am
But be sure you dont run that on a production server, unless you can live with the performance bottleneck while SQL rebuilds the cache.
July 23, 2012 at 6:46 am
THanks for answer, So what will happen or difference between with DBCC FREESESSIONCACHE ,
July 23, 2012 at 6:48 am
DBCC DROPCLEANBUFFERS - Removes all clean buffers from the buffer pool.
DBCC FREESESSIONCACHE - Flushes the distributed query connection cache used by distributed queries against an instance of Microsoft SQL Server.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply