Updating Stats on Non-Indexed Data

  • Hello,

    Does anyone know if update statistics works on everything or if it can be tweaked to only update stats for non-indexed data?

    One of the SQL Servers is taking forever to run this operation and I believe the indexed data is automatically being updated with update stats when the indexes are "rebuilt" weekly. Because we are doing a "rebuild", I shouldn't have to run update stats (at least for the indexed data).

    Please advise.

    Thank you!

  • Update Statistics has an options to update only column based statistics, index based statistics or both. Please refer to BOL for exact syntax.

    Note: sp_updatestats will only update statistics that need to be updated, which - if run right after the rebuild process will not update statistics on indexes that have just been rebuilt. However, be aware that by default sp_updatestats will use the default sampling rate - which may not be good enough or may revert index statistics that were just rebuilt with a full scan to a sampling rate. Using the RESAMPLE option will make sure that those statistics would be updated with a full scan if they are selected.

    Jeffrey Williams
    Problems are opportunities brilliantly disguised as insurmountable obstacles.

    How to post questions to get better answers faster
    Managing Transaction Logs

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply