Database Statistics Scanning Constants (SQLDMO_STAT_SCAN_TYPE)

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

Database statistics scanning constants control behavior of the UpdateStatisticsWith method of the Table object. Use the UpdateStatisticsWith method to force a refresh of query optimization supporting statistics maintained by Microsoft SQL Server.

Constant

Value

Description

SQLDMOStatistic_FullScan

3

Performs a full scan of the specified index or column to determine statistics values.

SQLDMOStatistic_Percent

1

Performs a sampled scan of the specified index or column using a percentage value. If specified, use the ScanNumber argument to indicate percentage. Use a whole number to specify percentage. For example, use 55 to specify 55 percent.

SQLDMOStatistic_Rows

2

Performs a sampled scan using a number of rows. If this constant is specified, use the ScanNumberargument to indicate the number of rows.

SQLDMOStatistic_Sample

0

Performs a percentage sampled scan using a system-defined percentage.