MemoryGrantInfo – What are Different Status of IsMemoryGrantFeedbackAdjusted? – Interview Question of the Week #253

Question: What do the IsMemoryGrantFeedbackAdjusted states mean? They describe whether memory grant feedback adjusted the statement’s grant, is still learning, or did not make an adjustment.

An adjustable belt illustrates finding a stable fit

I made up this interview question myself after a week of writing about memory grant feedback. It wasn’t an interview someone reported to me. The useful task is to open an actual execution plan, select its root SELECT operator, open Properties, expand MemoryGrantInfo and inspect IsMemoryGrantFeedbackAdjusted.

Original SSMS SELECToperator Properties window points to MemoryGrantInfo
The historical capture shows where MemoryGrantInfo lives. Its clipped SQL is not being offered as a runnable query.
Displayed stateWhat it tells you
No: First ExecutionThe first compilation and execution have not used feedback to adjust the grant.
No: Accurate GrantNo spill occurred and at least half of the granted memory was used, so adjustment was not triggered.
No: Feedback disabledRepeated increases and decreases made the feedback unstable, so adjustment stopped for the statement.
Yes: AdjustingFeedback was applied; a later execution may adjust it again.
Yes: StableThe previous and current grants are the same after feedback. This does not prove a globally optimal plan.

Those are the five states discussed in the original SQL Server 2019 article. Current versions also expose Yes: Percentile Adjusting for the percentile algorithm introduced with SQL Server 2022. That mode uses a longer history, with Query Store persistence requirements, rather than only the last execution.

The original compact names omitted spaces and punctuation. Match the displayed value in your SSMS version, and read RequestedMemory, GrantedMemory and MaxUsedMemory alongside it. A stable grant doesn’t say every other aspect of the query is fast.

Feedback can stop when repeated increases and decreases make the grant unstable. Do not assume a universal count of exactly 32 adjustments across versions and algorithms.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.


Discover more from SQL Authority with Pinal Dave

Subscribe to get the latest posts sent to your email.

SQL Memory, SQL Server
Previous Post
How to Disable Batch Mode in SQL Server? – Interview Question of the Week #252
Next Post
What is the Priority of Database Scoped Configurations? – Interview Question of the Week #254

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.