Cardinality Estimation in SQL 2014

By Navratan Verma

Here is the quick exercise performed today to evaluate Cardinality Estimation in SQL 2014.

Installed SQL Server 2014 and restored the database AdventureWorks2008.

Executed the following Script get the Full Script Here.  SQL2014_Cardinality

Cardinality1

Can the below query with Actual Execution Plan.

CardQUery1

Execution Plan Results – No of Rows Returned – 298024


 

Cardinality2


 

Set the Compatibility mode to 120 (SQL 2014) and re-run the query.

CompMode2

Execution Plan Results – No of Rows Returned – 298024

CardinalityFn

SQL 2014 – seems to have made good improvement in this critical area.

Leave a Reply

Your email address will not be published. Required fields are marked *