Monitoring Databases  «Prev 

Maintaining Database Statistics

Update Statistics Syntax

Update SQL Statement
Update SQL Statement

  1. Table – The table for which you are updating statistics.
  2. Index – A specific index on the table for which you are updating statistics.
  3. Statstics_name [,…n] – One or more statistic groups.
  4. FULLSCAN – Tells the create statistics command to scan the whole table when creating the statistics.
  5. Sample number PERCENT – Allows you to specify how much of the table to scan.
  6. ALL – Tells SQL Server to update statistics on both index and statistic groups.
  7. COLUMNS – Tells SQL Server to only update statistics on statistic groups.
  8. INDEX – Tells SQL Server to only update statistics on indexes.
  9. Norecompute – Stops SQL Server from automatically updating statistics on this statistics group.