|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Tuesday, April 02, 2013 5:40 AM
Points: 88,
Visits: 277
|
|
Hi
I have noticed that looking at the execution plan of one of our sql queries there is a little yellow triangle telling me that some of the columns do not have statistics. I updated the statistics containing the columns that were being complained about and yet the yellow traingle warning sign still continues to appear  Do I need to do something else?
Thanks Matt
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 11:21 AM
Points: 37,686,
Visits: 29,943
|
|
The warning triangle is saying there are statistics missing. Update stats only updates existing stats, it won't add new ones.
Is auto_create_stats on? What's the object that the warning is on?
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP 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
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Tuesday, April 02, 2013 5:40 AM
Points: 88,
Visits: 277
|
|
GilaMonster (2/16/2011) The warning triangle is saying there are statistics missing. Update stats only updates existing stats, it won't add new ones.
If I expand the statistics node on the table that has the problem columns there is a statistic in there that contains the colums that are supposedly missing. I clicked on the 'update statistics for these colums' checkbox hoping that it would clear the error.
GilaMonster (2/16/2011)
Is auto_create_stats on?
Not sure, how would I check that?
GilaMonster (2/16/2011)
What's the object that the warning is on?
It appears to be an index that is on the table
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Tuesday, April 02, 2013 5:40 AM
Points: 88,
Visits: 277
|
|
| I just checked the database properties and it looks like auto create stats is set to false
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Tuesday, April 02, 2013 5:40 AM
Points: 88,
Visits: 277
|
|
I just used this: -
USE <database name>; GO ALTER DATABASE <database name> SET AUTO_CREATE_STATISTICS ON; ALTER DATABASE <database name> SET AUTO_UPDATE_STATISTICS ON; GO
and it seems to fix the problem as the warning sign is gone now
|
|
|
|