June 7, 2014 at 3:22 pm
Comments posted to this topic are about the item Getting the Most out of Statistics
June 9, 2014 at 2:20 am
Good article, just wanted to add that we use the Ola Hallagren script suite for maintaining statistics at a lot of our larger client sites. Basically, updating stats was taking far too long in our maintenance cycle and we were looking for ways to make less it time consuming. This script suite is also great for Index maintenance and has saved us a lot of time there, but that's beside the point. It handles updating Statistics with the following options:
You can choose to update all statistics, statistics on indexes only, or statistics on columns only. You can also choose to update the statistics only if any rows have been modified since the most recent statistics update.
June 9, 2014 at 4:24 am
Thank you Ed for this very good peace, nicely done indeed!
😎
June 9, 2014 at 6:33 am
Great article. Thanks for sharing!
June 9, 2014 at 9:18 am
Excellent reasoning. Does sp_updatestats perform a FULL_SCAN or 50% sampling ?
June 9, 2014 at 9:41 am
feroz.durani (6/9/2014)
Excellent reasoning. Does sp_updatestats perform a FULL_SCAN or 50% sampling ?
Good question! sp_updatestats will run an UPDATE STATISTICS statement on all statistics in the database. This will use the default sampling that UPDATE STATISTICS would use if you ran that instead and did not include any additional parameters or options.
The default sampling of UPDATE STATISTICS is based on the data distribution and type, and therefore is not uniform. You can pass a resample parameter into sp_updatestats, but all that does is tell it if it should use the same sample size as last time or not (default is to not reuse the previous sample size). So sp_updatestats does not use FULLSCAN or 50%, nor can you tell it to do so.
For more granular control over the updating of statistics, use UPDATE STATISTICS, where you can specify more options,if desired. If the defaults are cool with you, then sp_updatestats is worth the convenience.
June 9, 2014 at 11:07 am
Very concise and informative. Thank you.
Best regards,
Andre Guerreiro Neto
Database Analyst
http://www.softplan.com.br
MCITPx1/MCTSx2/MCSE/MCSA
June 9, 2014 at 1:37 pm
Great article.
Aligns perfectly with your SQL Saturday Presentation 2 days ago - awesome contributions to the cause!
Doug
June 10, 2014 at 8:10 am
Very nice and clear Ed.
Hope you are not getting overworked on SQL Saturday.
Jonathan Cohen
June 10, 2014 at 8:12 am
Jonathan Cohen (6/10/2014)
Very nice and clear Ed.Hope you are not getting overworked on SQL Saturday.
Jonathan Cohen
Thanks!!
So far so good w/ our SQL Saturday---I've got a bunch of great volunteers that are helping to take some of the load off, and lots of help with marketing. Looking forward to Rochester and Maine before getting a month "off" from traveling : )
June 12, 2014 at 9:46 am
Great article. I have been working with SQL Server for a year and this article is very informative for someone like myself. Thanks.
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply