次の方法で共有


UpdateStatistics メソッド (StatisticsScanType, Int32, Boolean)

指定した統計スキャンの種類、サンプル サイズ、および統計の再計算オプションを使用して、参照先のインデックスの統計を更新します。

名前空間:  Microsoft.SqlServer.Management.Smo
アセンブリ:  Microsoft.SqlServer.Smo (Microsoft.SqlServer.Smo.dll)

構文

'宣言
Public Sub UpdateStatistics ( _
    scanType As StatisticsScanType, _
    sampleValue As Integer, _
    recompute As Boolean _
)
'使用
Dim instance As Index
Dim scanType As StatisticsScanType
Dim sampleValue As Integer
Dim recompute As Boolean

instance.UpdateStatistics(scanType, sampleValue, _
    recompute)
public void UpdateStatistics(
    StatisticsScanType scanType,
    int sampleValue,
    bool recompute
)
public:
void UpdateStatistics(
    StatisticsScanType scanType, 
    int sampleValue, 
    bool recompute
)
member UpdateStatistics : 
        scanType:StatisticsScanType * 
        sampleValue:int * 
        recompute:bool -> unit 
public function UpdateStatistics(
    scanType : StatisticsScanType, 
    sampleValue : int, 
    recompute : boolean
)

パラメーター

  • recompute
    型: System. . :: . .Boolean
    インデックス統計を再計算するかどうかを示す Boolean 値です。
    True の場合、統計値が再計算されます。False の場合、再計算は行われません。

説明

注意

UserDefinedTableType オブジェクトに部分的に基づくインデックスは統計をサポートしないため、このメソッドを実行すると例外が発生します。