Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

_WA Statistics Expand / Collapse
Posted Monday, October 20, 2008 12:28 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Thursday, September 8, 2016 7:13 PM
Points: 872, Visits: 328
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.

Kindest Regards,

Post #588379
Posted Monday, October 20, 2008 2:10 AM



Group: General Forum Members
Last Login: Saturday, December 3, 2016 5:18 AM
Points: 45,619, Visits: 44,147
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

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #588407
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse