Update-SqlStatistic

Updates statistics.

Syntax

Update-SqlStatistic [-statistic] <Statistic> [[-scanType] {Percent | Rows | FullScan | Resample | Default}] [[-sampleValue] <Int32>] [[-recompute]] [<CommonParameters>]

Detailed Description

The Update-SqlStatistic function updates the specified statistic.

Related Commands

* Update-SqlStatistic

Parameters

Name Description Required? Pipeline Input Default Value
statistic    true  true (ByValue)   
scanType    false  false   
sampleValue    false  false   
recompute    false  false   

Input Type

None You can pipe SMO Statistic objects to Update-SqlStatistic

Return Values

None This function does not generate any output.

Examples

EXAMPLE 1

Get-SqlDatabase "Z002\sql2k8" "pubs" | Get-SqlTable -name authors | Get-SqlStatistic | Update-SqlStatistic
This command updates the SQL statistics of the authors table