May 22, 2015 at 7:56 am
Hi All,
Rebuilding the indexes covers the statistics.
When we are reorganizing the indexes, do we need to update index statics separately or it will also update the index statistics like reorg?
What is the good practice to update column statistics.
May 22, 2015 at 8:05 am
Reorganise does not update stats, you'll have to do it if you want them updated
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
May 26, 2015 at 11:51 am
Thank you.
I have a question
when I run the below query why for some of the statisticname have "both auto_created or user_created is zero" and with date just 2 days ago (We have rebuild index job on that day). It should show value "1" for auto_created
SELECT OBJECT_NAME(object_id) AS [ObjectName]
,[name] AS [StatisticName]
,STATS_DATE([object_id]
, [stats_id]) AS [StatisticUpdateDate]
,auto_created
,user_created
FROM sys.stats
where cast(STATS_DATE([object_id], [stats_id]) as date)!= '2015-05-26'
order by ObjectName, statisticUpdateDate;
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply