At the heart of SQL Server is the cost based optimizer. Stop and think about that a minute, it
attempts to give the “best plan” based on the cost of the work undertaken. How does it know the cost of the work before
its done the work ? This isn’t a conundrum, it doesn’t. It estimates!
How does it estimate ? That is statistics.

This will be a deep dive into how the optimizer makes its
decisions to give you a plan, the things that can go wrong and how you can have
influence over these choices.

X-ALT-DESC;FMTTYPE=text/html:

Estimation, Statistics and “Oh My!”

At the heart of SQL Server is the cost based optimizer. Stop and think about that a minute, it
attempts to give the “best plan” based on the cost of the work undertaken. How does it know the cost of the work before
its done the work ? This isn’t a conundrum, it doesn’t. It estimates!
How does it estimate ? That is statistics.

This will be a deep dive into how the optimizer makes its
decisions to give you a plan, the things that can go wrong and how you can have
influence over these choices.

Dave Ballantyne

Dave is a freelance SQL Server database architect / designer / developer / consultant and lives near London, England. He takes a keen interest in all things SQL and data related and is never happier than picking apart a poorly executing query. He has also created an open sourced add-in for SQL Server data tools (SSDT) called "TSQL Smells". This detects and reports on 'suspect' code within a project and can be found at http://tsqlsmellsssdt.codeplex.com . Outside of work he is husband, father of 3 and exasperated archer.