Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3421302
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:05:33+00:00 2026-05-18T06:05:33+00:00

In the system I’m working on, we were seeing a particular SELECT use a

  • 0

In the system I’m working on, we were seeing a particular SELECT use a clustered index scan, instead of using the index which was created for this SELECT. I took a look at the statistics for the index, and found that they were 26 days old. I updated the statistics with FULLSCAN. Now the SELECT is using the index.

AUTO_UPDATE_STATISTICS has been enabled in this database the entire time. Why did the statistics not get updated?

Looking at the STATS_DATE() output (query below):

SELECT 
    object_name = Object_Name(ind.object_id),
    IndexName = ind.name,
    StatisticsDate = STATS_DATE(ind.object_id, ind.index_id),
    ind.type
  FROM SYS.INDEXES ind
  order by STATS_DATE(ind.object_id, ind.index_id) desc

I see that many indexes were updated recently. Some large tables which have data updates every day have not had updated statistics in weeks.

How does MSSQL 2005 decide when to update statistics when AUTO_UPDATE_STATISTICS is enabled? The documentation states:

A statistics update is initiated whenever the statistics used in a query execution plan fail a test for current statistics. . . Almost always, statistical information is updated when approximately 20 percent of the data rows has changed.

Can this be trusted? Perhaps these tables are so large that the “current statistics test” is passing even though records are being inserted on a daily basis.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T06:05:34+00:00Added an answer on May 18, 2026 at 6:05 am

    Here’s a link to the algorithm details in a Microsoft whitepaper

    http://technet.microsoft.com/sv-se/library/cc966419(en-us).aspx#XSLTsection130121120120

    And this quoted from Erland Sommarskog:

    When you have an empty table,
    autostats first kicks in after 500
    rows. From there, autostats sets in
    when 20% of the rows have been
    modified. This is measure from some
    rowmodctr.

    This has the effect that big tables
    with a monotonously growing key where
    queries goes against the trunk have
    their statistics updated far too
    rarely.

    Whereas small tables where all rows
    are updated frequently, or where or
    rows are added and deleted, have their
    stats updated very often, which may
    cause recompilation issues.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The system I am currently working on requires some role-based security, which is well
The System.Windows.Threading.DispatcherObject class (which DependencyObject is based on) contains a useful function, called CheckAccess()
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace GenericCount { class Program {
System.Console.WriteLine(int.MaxValue); This line gives me the answer of 2,147,483,647 as I have a 32-bit
Does system.Reflection work when I use release folder ?
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Linq; namespace ConsoleApplication2 { class
Using System.Move() to insert/delete item(s) from an array of string is not as easy
the system I'm working with consists of: A front-end application written in most likely
System.IO.Directory.GetFiles() returns a string[] . What is the default sort order for the returned
System.IO.BinaryReader reads values in a little-endian format. I have a C# application connecting to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.