Accurate statistics about the data held in tables are used to provide the best execution strategy for SQL queries.but if the statistics don't accurately reflect the current contents of the table you'll get a poorly-performing query.SQL Server Query Optimizer uses statistics to estimate the distribution of values in one or more columns of a table or index views, and the number of rows (called ) to create a high-quality query execution plan.

ms sql updating statistics-73ms sql updating statistics-44ms sql updating statistics-50

Executive Summary: Microsoft SQL Server 2005 can create statistics on unindexed table columns--called column statistics-which along with index statistics can help the SQL Server query optimizer determine the most efficient query plans.

To enable column statistics, you need to make sure the auto_create_statistics database option is set to ON.

If statistics are out of date, or do not exist, the optimizer can make poor choices and execution plan quality, and consequently query performance, can suffer.

SQL Server can automatically maintain statistics, periodically refreshing them based on its tracking of data modifications.

There are different ways you can view the details of the statistics objects.

For example, as shown in the query below, you can use the DBCC SHOW_STATISTICS command.How do you find out if statistics are correct, and what can you do if the automatic update of statistics isn't right for the way a table is used?Statistics are critical metadata used by SQL Server’s query optimizer, which influence the selected execution plan for a query.(See “Making the Most of Automatic Statistics Updating,” October 2007, Instant Doc ID 96767 for more information about automatic updating of index statistics.) In addition to providing statistics for indexes, SQL Server can create statistics on unindexed table columns—called .Along with index statistics, column statistics help the SQL Server optimizer create efficient query plans.Statistics refers to the statistical information about the distribution of values in one or more columns of a table or an index.