The last statistics update is null, and now?

Miguel Gavinhos 211 Reputation points

Why is StatisticsUpdatedate is null? How to fix it ?

The script is :

SELECT *, OBJECT_NAME(object_id) AS [ObjectName]
,[name] AS [StatisticName]
,STATS_DATE([object_id], [stats_id]) AS [StatisticUpdateDate]
FROM sys.stats;

Best regards,

No comments
{count} votes

Accepted answer
  1. Miguel Gavinhos 211 Reputation points

    I can observe that user tables without records get StatisticUpdateDate = null, but I have user tables with records that StatisticUpdateDate = null.

2 additional answers

Sort by: Most helpful
  1. Tom Phillips 17,606 Reputation points

    That is perfectly normal. It just means the stats have not been updated since they were created.

    Are you having an issue of some kind?

    No comments

  2. Miguel Gavinhos 211 Reputation points

    It looks by design, and I can see that I have a bunch of user tables with a persistent statistics update date = 'null' that by no method can I get it changed from null to a date. I'm not saying that it is always or never I have no data to support this statement. The methods are and sp_MSforeachdb 'use [?]; exec sp_updatestats'. I'm I missing something?