RESOURCE_SEMAPHORE_SMALL_QUERY is a small query waiting for a memory grant, documented for SQL Server 2008 R2 only. It does not appear in sys.dm_os_wait_stats on current versions. If you are on a supported version and seeing memory grant waits, the wait to read is RESOURCE_SEMAPHORE, and the check works there too.Microsoft’s definition: it occurs when memory request by a small query can’t be granted immediately because of other concurrent queries. The same entry says the wait should not exceed a few seconds, because the server moves the request to the main query memory pool if it cannot be granted within a few seconds, and that high waits might mean too many concurrent small queries while the main pool is blocked by waiting queries. It is marked as applying to SQL Server 2008 R2 only.
On our SQL Server 2025 lab the wait type does not exist at all. Modern versions still have a separate small-query resource semaphore, and sys.dm_exec_query_memory_grants shows which one a grant came from in its is_small and resource_semaphore_id columns. With this wait type gone, memory grant waits on current versions are read through RESOURCE_SEMAPHORE.
Is It a Problem?
On SQL Server 2008 R2, sustained waits meant the whole grant system was under pressure: the main pool was blocked and small queries were piling up too. On current versions it is not a wait you will see. Memory grant pressure shows as RESOURCE_SEMAPHORE, and the baseline to monitor is that wait and the grant queue in normal hours.
The Check To Run
On any version, see what is waiting for grants and which semaphore each request is on:
SELECT
session_id,
requested_memory_kb,
granted_memory_kb,
wait_time_ms,
queue_id,
is_small,
resource_semaphore_id
FROM sys.dm_exec_query_memory_grants
ORDER BY requested_memory_kb DESC;
Rows with no granted_memory_kb are waiting, and is_small = 1 marks the small-query semaphore. The query needs VIEW SERVER STATE.
What To Do
- Follow the RESOURCE_SEMAPHORE walkthrough: find the queries with the largest grants and fix the reasons for them, such as missing indexes, stale statistics and unnecessary sorts.
- Check
max server memoryand overall memory health so grants have room. - If you are still on SQL Server 2008 R2 or earlier, the same steps apply, and so does planning the upgrade.
The RESOURCE_SEMAPHORE Family
These waits are memory and resource gates: a query queuing for workspace memory to run, for memory to compile, or for the mutex that hands both out. The main page is RESOURCE_SEMAPHORE, with two walkthroughs for the runtime grant wait.
- RESOURCE_SEMAPHOREMemory grants. A compiled query waiting for the workspace memory it needs to run.The main page for this family
- Troubleshoot RESOURCE_SEMAPHOREStep by step. Finding the queries holding and waiting for grants, and what to change.The walkthrough
- Below max server memoryThe odd case. Grant waits while SQL Server is nowhere near its memory cap.A case study
- RESOURCE_SEMAPHORE_QUERY_COMPILECompile memory. A query waiting at a compile memory gateway before it can finish compiling.Worth a look when it climbs
- RESOURCE_SEMAPHORE_MUTEXThe gate itself. The mutex around handing out grants and thread reservations.Worth a look when it climbs
- RESOURCE_SEMAPHORE_SMALL_QUERYSmall query lane. A small query waiting for a grant; documented for SQL Server 2008 R2 only. This page.
Where To Go Next
For memory grant waits on a current version, these are the next places to look.
- RESOURCE_SEMAPHORE, the memory grant wait on current versions.
- Troubleshoot RESOURCE_SEMAPHORE, the step-by-step walkthrough.
- The waits that usually matter, ranked, with what each one is telling you.
- Performance & Troubleshooting, the scripts and guides for this part of the stack.
Leave a Reply