Monday 29 April 2013

Sp_updatestats RESAMPLE option

sp_updatestats  executes UPDATE STATISTICS against all the tables on a database, that require an update. Sp_updatestats accepts the @resample argument. This forces the UPDATE STATISTICS resample option.
Using  RESAMPLE updates the statistics based on the latest sample rate.  To view the latest sample rate use the DBCC SHOW STATISTICS command.


 
use db_name
go
DBCC SHOW_STATISTICS('a_table',a_statistic)

No comments:

Post a Comment