Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server clear memory

Tags:

sql

sql-server

Is it possible to clear RAM memory from data that SQL Server fill in?

Is there any procedure or option which can do that?

like image 825
veljasije Avatar asked Feb 01 '13 12:02

veljasije


2 Answers

You can use

CHECKPOINT
DBCC DROPCLEANBUFFERS

to remove all data pages from memory. It's useful to test server performance: a query performs differently if the data pages it needs are not cached.

like image 182
Andomar Avatar answered Oct 27 '22 11:10

Andomar


You don't release memory. If you want it to use less memory, then add the restriction in server settings.

If you did release the memory, it would slow down your queries as everything would have to be read from disk again.

like image 45
cjk Avatar answered Oct 27 '22 09:10

cjk