Sql Server : Difference between FREESYSTEMCACHE, FREEPROCCACHE, DROPCLEANBUFFERS, etc
- Posted by Sqltimes
- On July 25, 2015
- 0 Comments
Quick one today:
In a previous post, we discussed the different ways to clean Sql Server cache. Now we look at another one. DBCC FREESYSTEMCACHE.
1
2
|
DBCC FREESYSTEMCACHE( 'ALL' ) GO |
DBCC FREESYSTEMCACHE
As the name suggests, FREESYSTEMCACHE allows us to free up any unused cache in Sql Server memory. Sql Server usually, cleans up any unused cache from memory to free up space for new entries to use. But if we need to run this on demand, we could use this command to free-up. In addition to that we could also specify a particular pool that we want to clear or ALL pools.
Example 1: To clear all entries from from ‘default pool’
1
2
3
4
5
|
-- -- Clear the 'default' pool un-used entries -- DBCC FREESYSTEMCACHE( 'ALL' , 'default' ) GO |
Example 2: To clear all entries from all pools
1
2
3
4
5
|
-- -- Clear unused entries from all pools -- DBCC FREESYSTEMCACHE( 'ALL' ) GO |
0 Comments