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
- Decrease query complexity
- Appropriate indexing could reduce plan complexity
- Improve plan reuse (therefore compilation can be avoided)