August 10, 2017 at 8:39 am
Hi Everyone!
Have another question regarding the statistics update. Upon reaching the threshold of 20%+500 rows , does SQL server update all the statistics for that table , or it looks at this threshold for each stats objects and then updates as they qualify ? Thank you in advance.
Arshad
August 10, 2017 at 4:45 pm
Neither.
When a query needs a statistic (for optimisation), the row modification count is checked. If it exceeds the threshold, then that statistic (and only that statistic) is 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
August 11, 2017 at 7:52 am
GilaMonster - Thursday, August 10, 2017 4:45 PMNeither.When a query needs a statistic (for optimisation), the row modification count is checked. If it exceeds the threshold, then that statistic (and only that statistic) is updated.
Yeah I understand that the update initiation is propelled by the requirement of the optimization , and then the threshold is checked . Didn't know it'll be on only that stats object. Thanks for that. Where does SQL server get the row modification count ? I'm not expecting it to query the actual table to compare against the Histogram .Thanks.
Arshad
August 11, 2017 at 8:17 am
Internal counters. Exposed in the DMV sys.dm_db_stats_properties
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
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply