Update statistics
For every index and for some columns, statistics are created automatically or manually. Statistics provide a very important description of data density and distribution for SQL Server's cardinality estimation when optimizing and compiling queries. Statistics, unlike indexes, are not refreshed within every query-modified data. That's why statistics are going out of date, even if SQL Server has an auto-update statistics feature. To maintain up to date statistics is the DBA's responsibility. The simplest way to reach it is to use the update statistics task in the maintenance plan. This task calls two different statements depending on its setting. When update all statistics is set, system stored procedure sp_updatestats is executed. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access