Wednesday 10 July 2013

SQL Server Query Optimization Statistics

What are Query Optimization Statistics?

The term statistics refers specifically to distribution statistics. Distribution statistics describe index key values, specifically:
  • Selectivity – Refers to how many rows are identified by a key value. A unique index has high selectivity. A key with many duplicates has low selectivity. 
  • Distribution – Used when estimating how efficient an index will be in retrieving data associated with a key value or range. 

Example query
Example query

The query optimization statistics are simply a form of dynamic metadata that contain statistical information about the distribution of values in one or more columns of a table or indexed view.

Full article - Understanding SQL Server Query Optimization Statistics

No comments:

Post a Comment