question

ashok2012 avatar image
ashok2012 asked

why do we need Statistics update in SQL Server?

Hi, Why do we need Statitics to be updated in SQL Server Can any one explain what would be happen background when we updated statistics of table? What Order can we process/do Index Rebuild, Index Reorganize, Statistics Update on SQL database? Can any one say what would be happend background Index Rebuild(IR),Index Reorganize(IRO), Statistics update(SU)?
statisticsindex-performanceupdate-stats
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Your question is way to broad for anyone to spent time answering in a detail to make it understood. I would suggest searching for that online or looking at purchasing the book on SQL Server Indexing by Jason Strate.
0 Likes 0 ·

1 Answer

· Write an Answer
Venkataraman avatar image
Venkataraman answered
Why do we need to update statistics & Can any one explain what would be happen background when we updated statistics of table? SQL Server makes use of a cost-based optimizer that can be extremely sensitive to statistical information that is provided on tables and indexes. Without correct and up-to-date statistical information, SQL Server can be challenged to determine the best execution plan for a particular query. For more information, refer to [ https://support.microsoft.com/en-us/kb/195565][1] What Order can we process/do Index Rebuild, Index Reorganize, Statistics Update on SQL database? Based on fragmentation, you will decide whether to go for rebuild or reorganize. After rebuild or reorganize, you can update statistics for indexes, which were not either rebuilt or reorganized. Refer to [ http://www.sqlskills.com/blogs/paul/search-engine-qa-10-rebuilding-indexes-and-updating-statistics/][2] [1]: https://support.microsoft.com/en-us/kb/195565+ [2]: http://www.sqlskills.com/blogs/paul/search-engine-qa-10-rebuilding-indexes-and-updating-statistics/
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Should say: "...you can update statistics for indexes, which were not rebuilt" Reorganization of index won't update statistics with full scan
1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.