The query processor ran out of internal resources
See original GitHub issueAsk a question
Users can filter on a number of criteria in an app. I’m seeing the following error when running a query that has a lot of filters. This mostly translates to an Exists
statement for most filter criteria, which are spread across multiple tables.
The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.
When I take the SQL from the Application Output and reassemble with the query parameters, it runs just fine.
Why would it be different for EF Core and is it something I can mitigate?
Include provider and version information
EF Core version: 5.0.9 Database provider: Microsoft.EntityFrameworkCore.SqlServer Target framework: .NET 5.0 Operating system: macOS 11.5.2 IDE: Visual Studio 2022 for Mac build 2706
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Likely duplicate of #13617.
@ajcvickers I can do that but would need to change names and values - would that pose any issue on your end?