Search code examples
sql-serverclustered-indextable-statistics

Do table statistics get updated during the creation of a clustered index?


After I have created a clustered index on a table, is there any point in updating the statistics for that table?

Cheers.


Solution

  • No, the statistics will of been updated automatically on the index creation.

    If anything an update statistics will make it worse since it will default to samping the data, where as the index creation looked at all the data. sp_update_stats checks the row modification counter to prevent uncessary updates, so would not show a difference, but I'm not sure if directly issuing a update statistics command on the table would check first.