Sample Header Ad - 728x90

SQL Server 2014 Cardinality Estimator estimate final number of rows after OUTER JOIN is less than number of rows from initial table

0 votes
1 answer
175 views
I have a [SQL query] for SQL Server 2019. It works fine with option (USE HINT ('FORCE_LEGACY_CARDINALITY_ESTIMATION')) and very bad without this hint. I found out, that SQL Server 2014 Cardinality Estimator estimate final number of rows after OUTER JOIN **is less than number of rows from initial table** without any WHERE predicates and **with option (recompile)**. New CE Plan Legacy Cardinality Estimator estimate final number of rows after OUTER JOIN is equal or more number of rows from initial table (correct). Old CE Plan Is this a bug of SQL Server 2014 Cardinality Estimator or I do something wrong?
Asked by Андрей Ерёмин (1 rep)
May 22, 2023, 08:05 AM
Last activity: May 31, 2023, 04:46 AM