liveBook · Manning

Cardinality estimation feedback

As explained in 100 SQL Server Mistakes and How to Avoid Them

Cardinality estimation feedback is an adaptive SQL Server feature that identifies inaccurate row-count estimates and improves subsequent plan choices.

Treating optimizer row estimates as reliably accurate can leave SQL Server with a poor query plan. Cardinality estimation feedback (CE feedback) identifies inaccurate estimates and helps improve later plan choices. section 10.6

SQL Server derives estimates from column and index statistics through an algorithm, but usage patterns vary too widely for every estimate to be correct. Poor estimates can therefore produce suboptimal plans and poor performance. section 10.6

Use CE feedback as part of SQL Server’s query feedback options:

  • Keep CE feedback distinct from DOP feedback and memory grant feedback: each adapts a different aspect of query execution. section 10.6

How 100 SQL Server Mistakes and How to Avoid Them covers it

How deep it goes
Explains estimates, statistics, algorithmic limits, and performance effects but does not detail CE feedback internals or activation syntax.
Examples
Uses inaccurate row estimates, suboptimal plans, and a database-scoped configuration query as practical examples.
What it assumes
Assumes basic query-plan familiarity while defining row estimates, statistics, and their effect on plan selection.
What you can do after
Diagnose with a database-scoped configuration query and recognize when inaccurate estimates may explain poor query performance.
How it connects
Connects cardinality estimation feedback with query plans, column statistics, index statistics, DOP feedback, and memory grant feedback.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of 100 SQL Server Mistakes and How to Avoid Them. The section links point to the parts of the book it draws on.