Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On MS SQL Server, during the night we like to update the statistics, but this process is taking a long time and runs well into the morning.

Is it okay sample by rows where the number of rows is +100,000? or will this give the wrong statistics?

share|improve this question

2 Answers 2

Are you current using a FULLSCAN or PERCENT? How are you queries performing under your current scheme? It isn't necessarily easy but from my experience tying the two, UPDATE STATISTICS to query performance, provides a more arguable position for changing. Presumably the running well into the morning is causing issues. Whether or not a row count is "Okay" is a bit like the car ad ("your mileage may vary").

share|improve this answer

Your question cannot be answered by sheer volume of rows. You need to consider selectivity and density for a start.

Take a look at this article for more information:

http://www.simple-talk.com/sql/t-sql-programming/13-things-you-should-know-about-statistics-and-the-query-optimizer/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.