Sample Header Ad - 728x90

Index Exists, data is present, but statistics are empty. Why?

1 vote
0 answers
31 views
I’ve created a dump of all statistics on all tables in a Production database (based on the three sets returned by DBCC SHOW_STATISTICS). The database has been up and running for several months, and is actively used around the clock. Reviewing it all, I find that several statistics are not actually set. That is, the statistics *entry* is there, but “LastUpdated” is null, and there are no steps in the histogram table. I am not able to find a consistent reason for this—some are for indexes, unique indexes, filtered, indexes, filtered unique indexes, and auto-generated stats. Why is this? I can see a handful of remotely possibly reasons. Many are for where there is no data in the table (this makes sense), but there are many that do have rows (up to 10s of millions), and for any reason that might barely explain it ( “first-column duplicates” of other stats/indexes, unique indexes, filtered indexes, unlikely datatypes such as bit or large nvarchars), I can find something similar in another table/index where statistics are present. I’m mostly convinced it’s not just one single thing. What are the possible reasons that statistics might not be present for tables under these conditions? How worried should I be about this?
Asked by Philip Kelley (243 rep)
May 13, 2020, 04:28 PM
Last activity: May 13, 2020, 04:45 PM