Basically I have a proc that executes and requires massive amounts of memory. We can sometimes get into a situation where the proc executes multiple times, in which case the memory grants are visible in sys.dm_exec_query_memory_grants, because theyre waiting to be fulfilled.
We're trying to refactor the query so that it doesnt need such large amounts of memory, but its hard to get a baseline because we have to put the server in an unusable state to get the info from sys.dm_exec_query_memory_grants. Is there an equivalent to this view for any currently running query, not just those waiting or that have waited for grants? We're using SQL Server 2008.
Aucun commentaire:
Enregistrer un commentaire