Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 “Actual No. of Rows” Vs “Estimated (STATS)
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

United Kingdom
115 Posts

Posted - 02/28/2013 :  09:48:45  Show Profile  Reply with Quote
"Script required" (lost copy I had from repository)

Hi. Have reason to believe a generic UPDATE STATISTICS maint script on clients site is not successfully working despite last 'date' correlating with job execution date. Think we discovered the sample rate was 0.01 rendering the updates pointless.

Does anyone have a script comparing Actual No. rows Vs Estimated rows? (see justification below) Thanks in advance

If these numbers are (consistently) fairly close, then most likely your statistics are up-to-date and used by the optimizer for the query. If not, time for you to re-check your statistics create/update frequency.

The Chadinator

1974 Posts

Posted - 03/09/2013 :  18:18:01  Show Profile  Visit chadmat's Homepage  Reply with Quote
Yes, if you don't specify a sample rate, UPDATE STATISTICS will use a ridiculously low sample rate on large tables. I don't think you can access Actual rows vs Estimated rows unless you are capturing the query plan via trace. Not sure if there is an XEvent you could tap into. You can see your statistics with DBCC Show_Statistics and see the total rows vs. rows sampled and if it is a very low percentage, then you are likely getting very bad query plans.

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000