Level: Introductory to Intermediate
This session will teach you what statistics are, how they are generated and their use within the optimizer.
There are large numbers of performance tuning methods to get your queries to run faster. But the most important thing you can do to improve query performance is ensure that you have provided the query optimizer within SQL Server with the best possible statistics. This session will teach you what statistics are, how they are generated and their use within the optimizer. You'll be able to take home a better understanding of how the optimizer works with statistics in order to write better T-SQL and build better database structures to avoid common issues such as bad parameter sniffing.
You will learn:
- How to read the output from DBCC SHOW_STATISTICS in order to completely understand how statistics are stored within SQL Server and how they are used by the optimizer to create execution plans
- Understand the various mechanisms for automatically or manually creating statistics and where each is applicable
- How statistics are maintained, both automatically and manually, and which is applicable in a given situation