Created
February 12, 2019 11:32
-
-
Save andrijac/eff094b62398913b033425990c40f3f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT dest.text, | |
deqmg.granted_memory_kb, | |
deqmg.requested_memory_kb, | |
deqmg.grant_time, | |
deqmg.query_cost, | |
deqmg.dop, | |
deqp.query_plan | |
FROM sys.dm_exec_query_memory_grants AS deqmg | |
CROSS APPLY sys.dm_exec_sql_text(deqmg.sql_handle) AS dest | |
CROSS APPLY sys.dm_exec_query_plan(deqmg.plan_handle) AS deqp; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment