July 2014
Intermediate to advanced
214 pages
4h 47m
English
Query optimization statistics are only a form of dynamic metadata that contains statistical information about the distribution of values in one or more columns of a table or indexed view. Statistics describe index key values, are maintained for index columns, and are used by SQL Server when deciding on the most appropriate indexes to use when running queries. Statistics help estimate the cardinality, or number of rows, in the query result, and this usually helps the query optimizer make better decisions. For example, if there are only a dozen rows in a table, then there is no reason to go to the index to search. This is because it is always better to do a full table scan to find the required result set. However, if ...