Forum Discussion
bboissard
Oct 29, 2024Copper Contributor
SQL Server failing to execute extremely complex queries
A query is failing with this error message on a customer environment: The query processor ran out of internal resources and could not produce a query plan.
This is a rare event and only expected fo...
HenrikRClausen
Aug 04, 2025Copper Contributor
I have this happening occasionally (a few times per month) in Production.
Problem is: I do not know which of our many, complex queries throws this error. The SQL server log just lists the error, but not the query text or STP name of what threw the error.
Is there a way to identify which query is having trouble?
It's quite clear that some refactoring of it will be needed.