Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Query that consumes a lot of memory

$
0
0

Hello, I am new in this forum.  I have a problem and I hope you can help me.

I have a query, that reserves more than 20 Gb of memory, and uses only a few Mb.  I don't understand why the optimizer choose to reserve this amount of memory, the tables involved has their statistics up to date. 

I am watching the values in view sys.dm_exec_query_memory_grants.  I have for example in one execution this values:

requested_memory_kb: 20241384

used_memory_kb: 3072

ideal_memory_kb: 32648960

Is any wrong in my analyze?  Can you help me to understand this situation please?.

Thank you so much.

Regards!!


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>