Memory grant

  • SQL can't estimate OpenJson querying and is Granting excessive memory approx close to 1 GB by looking in the execution plan warning. It also uses a lot of memory to query out the Hash Joins. Has anyone came across this issue?

    • This topic was modified 4 years, 9 months ago by  Admingod.
  • Any advise. Happy to provide more details if needed?

  • 1) Do I even need to worry about this excessive memory grant? 2) If so, how can I avoid this?

  • what have you googled and what have you found out that you didn't understand?

    plenty of info out there and we are not here to do the search for you.

  • Found that enabling resource governor might help?

  • I tried with Option(Recompile), added indexes and then rewrote the query but the excessive memory grant warning is still exists.

    Found below link, this is the same problem i am facing. However, in my query i am selecting the JSON data using CROSS APPLY OPENJSON. Below link has the solution to upgrade to SQL 2019 but i did not able to find anything for SQL 2016. Hope this helps to anyone in the future.

    https://www.sqlshack.com/row-mode-memory-grant-feedback-sql-server-2019/

     

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply