RESOURCE_SEMAPHORE_QUERY_COMPILE

Description

This wait occurs when queries cannot be compiled due to the amount of compile memory currently available. This mostly occurs due to large queries requiring an excessive amount of memory. SQL Server caps the amount of complex queries that can be compiled at once, so increasing the memory allocation will not solve the problem effectively (it will only increase the amount of memory that can be allocated, not the number of queries)

Resolved by

DBAs and Developers

Suggested solutions

  1. Decrease query complexity
  2. Appropriate indexing could reduce plan complexity
  3. Improve plan reuse (therefore compilation can be avoided)

Additional research

What is RESOURCE_SEMAPHORE_QUERY_COMPILE?

See more

Consider using ApexSQL Monitor, a Windows and SQL Server monitoring tool able to track SQL Server wait types, including the individual query wait statistics

⇐ Back to index