snippetsqlMinor
DTA Recommends to CREATE STATISTICS
Viewed 0 times
dtarecommendsstatisticscreate
Problem
I just ran a T-SQL query through DTA and one of the recommendations is to CREATE STATISTICS on one of the columns that is part of many of the queries in the SQL code file.
My question is, how exactly do statistics aid in performance?
My question is, how exactly do statistics aid in performance?
Solution
statistics is used when query execution plan created.
Statistics for query optimization are objects that contain statistical information about the distribution of values in one or more columns of a table or indexed view. The query optimizer uses these statistics to estimate the cardinality, or number of rows, in the query result. These cardinality estimates enable the query optimizer to create a high-quality query plan. For example, the query optimizer could use cardinality estimates to choose the index seek operator instead of the more resource-intensive index scan operator, and in doing so improve query performance.
See http://msdn.microsoft.com/en-us/library/ms190397.aspx for more details.
Statistics for query optimization are objects that contain statistical information about the distribution of values in one or more columns of a table or indexed view. The query optimizer uses these statistics to estimate the cardinality, or number of rows, in the query result. These cardinality estimates enable the query optimizer to create a high-quality query plan. For example, the query optimizer could use cardinality estimates to choose the index seek operator instead of the more resource-intensive index scan operator, and in doing so improve query performance.
See http://msdn.microsoft.com/en-us/library/ms190397.aspx for more details.
Context
StackExchange Database Administrators Q#4665, answer score: 7
Revisions (0)
No revisions yet.