共用方式為


Statistic.Update 方法 (StatisticsScanType)

Updates information about the distribution of key values.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public Sub Update ( _
    scanType As StatisticsScanType _
)
'用途
Dim instance As Statistic 
Dim scanType As StatisticsScanType

instance.Update(scanType)
public void Update(
    StatisticsScanType scanType
)
public:
void Update(
    StatisticsScanType scanType
)
member Update : 
        scanType:StatisticsScanType -> unit
public function Update(
    scanType : StatisticsScanType
)

參數

備註

StatisticsScanType are listed in the following table.

Member

Description

Default

Value = 5. Specifies that a percentage of the table or indexed view is used when collecting statistics. The actual percentage is calculated by the SQL Server engine automatically.

FullScan

Value = 3. Specifies that all rows in the table or view are read when gathering statistics. This option must be used if a view is specified and it references more than one table.

Percent

Value = 1. Specifies that a percentage of the table or indexed view is used when collecting statistics. This options cannot be used if a view is specified and it references more than one table. When specified, use the sampleValue argument to indicate number of rows.

Resample

Value = 4. Specifies that the percentage ratio of the table or indexed view used when collecting statistics is inherited from existing the statistics

Rows

Value = 2. Specifies that a number of rows in the table or indexed view are used when collecting statistics. This option cannot be used if a view is specified and it references more than one table. When specified, use the sampleValue argument to indicate number of rows

請參閱

參考

Statistic 類別

Update 多載

Microsoft.SqlServer.Management.Smo 命名空間