MSSQL behaviour loves to eat RAM πͺ
⚠️ Understanding SQL Server Memory Management
-
SQL Server Memory Usage: SQL Server does not immediately release memory even if tables are truncated or data is deleted.
-
Memory Retention Mechanism: By design, SQL Server retains memory (buffer pool, plan cache) for performance reasons.
-
Memory Clearing is Manual: Reducing SQL Server's memory usage must be done explicitly.
Solution: Clear SQL Server Memory Manually
To manually clear SQL Server memory and force it to release unused memory:
1. Clear the Buffer Cache
2. Clear the Plan Cache
3. Clear Cache for Specific Database (Recommended)
Ulasan