Update stats question

  • Hi everyone,

    What is the difference between Update stats with full scan and Update stats with 50% sampling?

    Thank you.

  • The fullscan reads the entire table. The sampling 50% reads around 50% of the table (a sample)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • So, whenver I've to do Update stats, can I just do 50% sampling instead of fullscan?

  • Um...

    Sure, if you don't mind that SQL is only reading half the table (a random half) to compute the statistics. Half the table != the entire table.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 4 posts - 1 through 3 (of 3 total)

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