Tuesday, April 22, 2014

Have you ever wanted to test the speed of SQL command but after the initial execute, the SQL returns much faster because all the data has been cached into memory?  So how do I release all the memory cache and force SQL Server to reload all that data and work as hard as I can make it?




-- Date: 9/15/2010
-- Clean memory to run a proc again without the use of memory cache.

DBCC FREESESSIONCACHE
DBCC FREESYSTEMCACHE ( 'ALL' )
dbcc dropcleanbuffers
dbcc freeproccache


(c) 2014 RosSQL, all rights reserved.  This publication may not be republished without the expressed written permission of RosSQL.

No comments:

Post a Comment