Column.UpdateStatistics Column.UpdateStatistics Column.UpdateStatistics Method

Definition

Updates statistics for the column.

Overloads

UpdateStatistics(StatisticsScanType) UpdateStatistics(StatisticsScanType) UpdateStatistics(StatisticsScanType)

Updates Statistic objects that monitor this column.

UpdateStatistics(StatisticsScanType, Int32) UpdateStatistics(StatisticsScanType, Int32) UpdateStatistics(StatisticsScanType, Int32)

Updates Statistic objects that monitor this column using a sampled scan.

UpdateStatistics() UpdateStatistics() UpdateStatistics()

Updates Statistic objects that monitor this column.

UpdateStatistics(StatisticsScanType, Int32, Boolean) UpdateStatistics(StatisticsScanType, Int32, Boolean) UpdateStatistics(StatisticsScanType, Int32, Boolean)

Updates Statistic objects that monitor this column using a sampled scan.

UpdateStatistics(StatisticsScanType) UpdateStatistics(StatisticsScanType) UpdateStatistics(StatisticsScanType)

Updates Statistic objects that monitor this column.

public:
 void UpdateStatistics(Microsoft::SqlServer::Management::Smo::StatisticsScanType scanType);
public void UpdateStatistics (Microsoft.SqlServer.Management.Smo.StatisticsScanType scanType);
Public Sub UpdateStatistics (scanType As StatisticsScanType)
Parameters
scanType
StatisticsScanType StatisticsScanType StatisticsScanType

A StatisticsScanType object value that specifies the type operation to perform during the creation or update of a Statistic object.

Examples

Working with Database Objects

Remarks

Note

Columns based on the UserDefinedTableType object cannot be modified and this method generates an exception.

UpdateStatistics(StatisticsScanType, Int32) UpdateStatistics(StatisticsScanType, Int32) UpdateStatistics(StatisticsScanType, Int32)

Updates Statistic objects that monitor this column using a sampled scan.

public:
 void UpdateStatistics(Microsoft::SqlServer::Management::Smo::StatisticsScanType scanType, int sampleValue);
public void UpdateStatistics (Microsoft.SqlServer.Management.Smo.StatisticsScanType scanType, int sampleValue);
Public Sub UpdateStatistics (scanType As StatisticsScanType, sampleValue As Integer)
Parameters
scanType
StatisticsScanType StatisticsScanType StatisticsScanType

A StatisticsScanType object value that specifies the type operation to perform during the creation or update of a Statistic object.

sampleValue
Int32 Int32 Int32

An Int32 value that specifies the number of rows or percentage of the total number of rows to use in a sampled scan. This parameter is required only when the scanType indicates a sampled scan.

Examples

Working with Database Objects

Remarks

Note

Columns based on the UserDefinedTableType object cannot be modified and this method generates an exception.

UpdateStatistics() UpdateStatistics() UpdateStatistics()

Updates Statistic objects that monitor this column.

public:
 void UpdateStatistics();
public void UpdateStatistics ();
Public Sub UpdateStatistics ()

Examples

Working with Database Objects

Remarks

Note

Columns based on the UserDefinedTableType object cannot be modified and this method generates an exception.

UpdateStatistics(StatisticsScanType, Int32, Boolean) UpdateStatistics(StatisticsScanType, Int32, Boolean) UpdateStatistics(StatisticsScanType, Int32, Boolean)

Updates Statistic objects that monitor this column using a sampled scan.

public:
 void UpdateStatistics(Microsoft::SqlServer::Management::Smo::StatisticsScanType scanType, int sampleValue, bool recompute);
public void UpdateStatistics (Microsoft.SqlServer.Management.Smo.StatisticsScanType scanType, int sampleValue, bool recompute);
Public Sub UpdateStatistics (scanType As StatisticsScanType, sampleValue As Integer, recompute As Boolean)
Parameters
scanType
StatisticsScanType StatisticsScanType StatisticsScanType

A StatisticsScanType object value that specifies the type operation to perform during the creation or update of a Statistic object.

sampleValue
Int32 Int32 Int32

An Int32 value that specifies the number of rows or percentage of the total number of rows to use in a sampled scan. This parameter is required only when the scanType indicates a sampled scan.

recompute
Boolean Boolean Boolean

A Boolean value that specifies whether the statistics will be automatically recomputed or not.

If True, the statistics are automatically recomputed. Otherwise, False.

Examples

Working with Database Objects

Remarks

Note

Columns based on the UserDefinedTableType object cannot be modified and this method generates an exception.

Applies to