What are the parameters for the SQL Server INDEX REBUILD script?

The nightly Platform Maintenance stored procedure for Microsoft SQL Server has been updated from the older INDEX DEFRAG script to a new INDEX REBUILD script. These are the parameters that can be tailored for each individual environment. Please consult with a SQL Server DBA to tune these settings for optimum impact in your environment.

  • reorg_frag_thresh – The percentage threshold at which to reorganize indexes.
  • rebuild_frag_thresh – The percentage threshold at which to switch from reorganizing to rebuilding.
  • fill_factor – The percentage of space on each leaf-level page to be filled with data.
  • page_count_thresh – The number of pages the current table uses.
  • rebuild_online – Rebuild the indexes online so that other processes are able to access the table while the rebuild is occurring.
  • compute_statistics – Compute statistics on the tables or not.
  • report_only – If set to true, do not actually do the build, just report what the status of the indexes/stats/tables are.
  • MinutesToRun – How many minutes to run, where 0 means run until complete. This can be set to a limit, like 60, so the process would stop after 1 hour. On the next run, it will pick up where it left off.

Continue reading

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.