Evaluating Cardinality Estimates

One of the key factors that leads to the generation of a poor execution plan is inaccurate cardinality estimates. Poor estimation of cardinality can be the result of missing or out of date statistics, search arguments or join conditions that cannot be optimized effectively, or possibly problems with the algorithms used by the Cardinality Estimator.

You can validate the cardinality estimates against actual row counts by looking at the actual query execution plan when the query runs (the estimated query execution plan does not include run-time statistics). To enable the actual execution plan in SSMS, type ctrl-M or enable Include Actual Execution Plan in the Query menu. After executing your query, navigate to the ...

Get Microsoft SQL Server 2014 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.