http://www.sqlservercentral.com/blogs/andy_warren/2008/03/19/a-minor-rant-about-statistics/

Printed 2014/07/30 05:19AM

A Minor Rant About Statistics

By Andy Warren, 2008/03/19

If you've ever taken a look at the auto generated statistics that SQL builds (typically on non indexed columns when you reference the column in a where clause) you'll see that they are named _WA_Sys...blahblah. But why? A quick search didn't reveal any good answer (though perhaps I just didn't ask the right question) and in practice why do we care? We never reference the statistics by name unless we're really deep into a problem.

My reason for ranting is based on an event earlier this week. I was doing an adhoc demo to show a new statistic being created via autocreate when I referenced a non-indexed column. It worked fine, but I wanted to show the result - which meant opening up 5 or so wrong ones before I got the right one. Given that the auto created ones are usually (always?) on a single column, would it hurt to name the statistic something more useful - like the column name? So while I'm complaining, why is it that I can view the statistics (same as dbcc showstatistics) via the properties for stats on indexes, but not for 'plain' stats?

Maybe there's a good reason.


Copyright © 2002-2014 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.