October 20, 2008 at 12:28 am
I have lots of _WA Statistics on various Columns in a table. For example I have an _WA Statistics on a column called CustomerID. Does this mean that an Index is missing for the CustomerID Column and Hence the _WA Statistic has been generated automatically?
Does it mean that If i create an Index on the CustomerID Column, SQL Server will not create an _WA Statistics?
I'm trying to fully understand the reason for _WA Statistics.
October 20, 2008 at 2:10 am
The optimiser will create the column statistics if it needs to know the distribution of data in that column, and stats don't exist yet. If you create an index, that index will have statistics associated with it.
The presence of auto created stats may indicate that an index would be useful on that column. It's not a guarantee though. Since you're on 2005, also take a look at the missing index DMVs and see if there's any entry in there for this particular column. Also check the queries your running and make sure that they will be helped by an index on that column.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply