I was thinking about something like this today but I couldn't find this piece of information.
When the SQL Server requests memory and the OS can't provide it, we get a
RESOURCE_SEMAPHORE wait type.
but I can't find info like:
lets say the query asks for 3GB. But it's only possible to provide 2, does the query still run slowly, or it keeps there waiting?
RESOURCE_SEMAPHOREmeans the query is in a "stopped" state just waiting for the memory?
Memory grants pending should always be on 0 right? this means how much memory the queries are requesting but still waiting right?
I was reading Memory Grants: The mysterious SQL Server memory consumer with Many Names from Microsoft, but it doesn't explain this, it just explains what a Memory grant is.