Increase Memory for Queries in SQL Server

The default memory for query execution 'min memory per query' allocated by SQL Server is equal to 1024 KB.

When should I increase the default memory allocated to queries?
1024 KB is sufficient to run queries, however you may need to increase the memory if you have an extremely busy server that runs many concurrent queries simultaneously or your query is quiet resource intensive. Also before increasing the memory, set a few performance benchmarks like the 'Expected Query Time' to determine if you really require an increase.

Note: Do not increase the memory unnecessarily as SQL Server may require it for other operations.

How can I increase memory for query execution?

Just use this query to increase the memory to 1536KB

EXEC sp_configure 'show advanced options', 1
EXEC sp_configure 'min memory per query', 1536
RECONFIGURE WITH OVERRIDE
EXEC sp_configure 'show advanced options', 0
RECONFIGURE WITH OVERRIDE

No comments:

Post a Comment