Press "Enter" to skip to content

Tables without Histograms

Guy Glantser goes looking for stats:

A few weeks ago, I published a blog post titled “When Statistics Stay Empty Forever: A Hidden Edge Case with Empty Tables”

In that post, I described a scenario where statistics are created on an empty table, resulting in a statistics object without a histogram. If AUTO_UPDATE_STATISTICS is disabled and your maintenance solution doesn’t explicitly update statistics whose modification_counter is NULL, those statistics may never get a histogram – even after the table grows to millions or billions of rows.

Recently, I ran into another case involving missing histograms.

In this case, Guy found a table with 7 million rows and no histograms. Click through to see how that’s possible.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.