Azure SQL Server - Query failing
Hi Team,
SQL server - SQL Database Configuration
Hyperscale - Serverless: Gen5, 6 vCores [Scaled up the cores from 2 to 6 after query failure]
Below query is failing execute -
SELECT top 100 *
FROM [table1] a
LEFT JOIN
[dbo].[table2] b
ON
b."production_BOM_Number" = a."production_BOM_Number" AND
b."production_BOM_Version_Number" = a."production_BOM_Version_Number"
SELECT COUNT(*) FROM [table1]; -- 3516
SELECT COUNT(*) FROM [table2]; -- 6225
Error:
Msg 8623, Level 16, State 1, Line 3
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.
Please let me know what exactly is the issue that the query is failing even though the tables are not huge and the query is not complex.
Thanks,
Nalini Bhavaraju.