How to Free up the cache for an sql server instance DBCC FREEPROCCACHE or DBCC FREESYSTEMCACHE (new in SQL 2005) will clear the plan cache on that particular SQL Server instance. Bear in mind clearing the plan cache with this process causes a recompilation of all subsequent execution plans and cause a sudden, temporary excessive CPU usage and decrease in query performance. DBCC FREESYSTEMCACHE is new in SQL Server 2005 that will clear the unused cache entries from all the caches. You can use 'MARK_IN_USE_FOR_REMOVAL' clause in this DBCC statement to free up the currently used plans from the cache as and when they become unused. This is useful in order to remove them manually even though SQL 2005 Database Engine proactively cleans up unused cache entries in the background to make memory available for current entries. |