February 16, 2011 at 9:35 am
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 :crying:
Do I need to do something else?
Thanks
Matt
February 16, 2011 at 10:02 am
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, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
February 16, 2011 at 10:16 am
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
February 16, 2011 at 10:22 am
I just checked the database properties and it looks like auto create stats is set to false
February 16, 2011 at 11:25 am
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
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply