Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Updates information about the distribution of key values.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Syntax
'Declaration
Public Sub Update ( _
scanType As StatisticsScanType, _
sampleValue As Integer, _
recompute As Boolean _
)
'Usage
Dim instance As Statistic
Dim scanType As StatisticsScanType
Dim sampleValue As Integer
Dim recompute As Boolean
instance.Update(scanType, sampleValue, _
recompute)
public void Update(
StatisticsScanType scanType,
int sampleValue,
bool recompute
)
public:
void Update(
StatisticsScanType scanType,
int sampleValue,
bool recompute
)
member Update :
scanType:StatisticsScanType *
sampleValue:int *
recompute:bool -> unit
public function Update(
scanType : StatisticsScanType,
sampleValue : int,
recompute : boolean
)
Parameter
- sampleValue
Typ: System.Int32
Int32 - Specifies the percentage of the table or indexed view, or the number of rows to sample when collecting statistics for larger tables or views.
- recompute
Typ: System.Boolean
Boolean - Specifies if statistics that are out of date are automatically recomputed
Hinweise
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 |