May 28, 2022 at 4:10 pm
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
May 29, 2022 at 4:29 am
See the following article and the link to the other article list in it.
That will help you provide the proof you need to increase your RAM.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 29, 2022 at 11:05 am
on some of my busy and misbehaved servers I have the following query running every 10 seconds with output to a table.
with this table its easy to identify queries that may require rewriting as well queries that may request incorrect memory grant due to bad statistics
insert into MemoryGrants
select getdate() as report_time
, qmg.session_id
, qmg.request_id
, qmg.scheduler_id
, qmg.dop
, qmg.request_time
, qmg.grant_time
, qmg.requested_memory_kb
, qmg.granted_memory_kb
, qmg.required_memory_kb
, qmg.used_memory_kb
, qmg.max_used_memory_kb
, qmg.query_cost
, qmg.timeout_sec
, qmg.resource_semaphore_id
, qmg.queue_id
, qmg.wait_order
, qmg.is_next_candidate
, qmg.wait_time_ms
, qmg.plan_handle
, qmg.sql_handle
, qmg.group_id
, qmg.pool_id
, qmg.is_small
, qmg.ideal_memory_kb
, t.text
from sys.dm_exec_query_memory_grants qmg
cross apply sys.dm_exec_sql_text(qmg.sql_handle) as t
where qmg.requested_memory_kb > 100000 -- queries requesting more than 100MB of memory
;
Viewing 3 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply