Sp_updatestats RESAMPLE option

22 March,2013 by Jack Vamvas

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
DBCC SHOW_STATISTICS('a_table',a_statistic)


If RESAMPLE is not used , UPDATE STATISTICS based on a sample default rate. The sample default rate is determined by SQL Server . 

Deciding on which method to use is dependant on the level of granular control required.

Read More

SQL Server - Find last time STATISTICS updated - update statistics

Cannot create or update statistics on view because both FULLSCAN and NORECOMPUTE options are required


Filtered statistics, T-SQL best practises for T-SQL Tuesday



Author: Jack Vamvas (http://www.sqlserver-dba.com)


Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment on Sp_updatestats RESAMPLE option

sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer