Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Administration - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 6525

House Keeping - Statistics

$
0
0
Hi all,I wondered if anyone had a good formula for updating statistics for an overnight job we have, the job currently looks at index fragmentation and based on the page count and fragmentation then decides to optimise or rebuild.Currently it then run's sp_updatestats for all the databases, I've gone and written something new which scans for statistics which have not been updated in a certain time based on a parameter it then records the details as it updates each one. The question is what sample rate to use, using 100% on a table with millions of records causing a lot of I/O and takes an age, and likewise is there much difference between 20% and 100% on a table with 50 rows? The sample rate should really be decided based on the table size in the same way auto stats update is based on the row count.Has anyone done anything similar? If so how did you determine the sample rate? or is their a more generic formula I can use?Any help would be appreciated.Thanks,Nic

Viewing all articles
Browse latest Browse all 6525

Trending Articles