Kalen Delaney has been working with SQL Server for over 32 years, providing advanced SQL Server training to clients around the world. She SQL Server MVP for 25 years before joining Microsoft where she writes and delivers SQL Server training.
Exploring Statistics: Where estimated rowcount comes from
A look inside SQL Server distribution statistics
Where do the estimated rowcount values come from? Look inside SQL Server’s distribution statistics to see how they are used to come up with the estimates. We’ll also discuss changes in the cardinality estimator in recent versions and look at some new metadata that gives us more statistics information. Goals:
- Explore the output of DBCC SHOW_STATISTICS
- Describe when the density information is useful
- Look at some problem scenarios for which the statistics can’t give good estimates
- Understand why cardinality estimation involves more than just the statistics