0

SQLServer 2005 DB があります。DBバッファサイズを増やしました。クエリを実行すると、sqlserver.exe のメモリ使用量が増加します。これは正常な動作です。このクエリの後、DB はスリープ モードになりますが、RAM PF 使用量は減少しません。クエリの後、mssql キャッシュを削除したい。

クエリの後、これらを実行します: DBCC FREESYSTEMCACHE('SQL Plans'); DBCC FREESESSIONCACHE; DBCC FREEPROCCACHE;

ただし、RAM PF の使用量は減らしません。これどうやってするの?

4

1 に答える 1

1

The dbcc statements you are executing free the plan caches, not the buffer cache.

Try using:

checkpoint
GO

dbcc dropcleanbuffers

Even after running this, SQL Server may not give the memory back. If you are using dynamic memory management (min server memory < max server memory), then usually it will only give back if there is memory pressure.

If you're using a static allocation (min server memory = max server memory), it will never give it back.

Also, this stuff is fine if you are just messing around testing stuff. I won't recommend doing it on important systems.

于 2013-02-21T08:34:32.507 に答える