When do we use the UPDATE_STATISTICS command?- UPDATE_STATISTICS updates the indexes on the tables when there is large processing of data.
- If we do a large amount of deletions any modification or Bulk Copy into the tables, we need to basically update the indexes to take these changes into an account.
- It ensures that queries, compile with up-to-date statistics.
- It causes queries to recompile.
- It can be used 'tempdb' to sort the sample of rows for building the statistics.
|