How can we find whether statistics were updated with FULLSCAN, or with a sampling

  • How can we find whether statistics were updated with FULLSCAN, or with a sampling?

  • DBCC SHOW_STATISTICS and check the values for rows and rows sampled.

    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
  • I checked those 2 columns values and both are showing same value as 1000 & 1000.

    So how we know statistics were updated with full scan or with sampling?

  • gmamata7 (6/5/2013)


    I checked those 2 columns values and both are showing same value as 1000 & 1000.

    So how we know statistics were updated with full scan or with sampling?

    Logic says if both are equal it must be a full scan.

    http://msdn.microsoft.com/en-us/library/ms174384(v=sql.100).aspx

  • gmamata7 (6/5/2013)


    So how we know statistics were updated with full scan or with sampling?

    Definition of full scan - read the entire thing. Definition of sampling, read parts. Hence if the two are the same, all the rows were read, hence it was a full scan. If the two are different, SQL read only samples of the table, hence sampled.

    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 5 posts - 1 through 4 (of 4 total)

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