Update SQL Server Statistics
Update SQL Server Statistics
Update SQL Server Statistics
If the table has no rows, statistics is updated when there is a single change in table.
Permanent table If the number of rows in a table is less than 500, statistics is updated for every 500 changes in table.
If the number of rows in table is more than 500, statistics is updated for every 500+20% of rows changes in table.
If the table has no rows, statistics is updated when there is a single change in table.
If the number of rows in table is less than 6, statistics is updated for every 6 changes in table.
Temporary table
If the number of rows in table is less than 500, statistics is updated for every 500 changes in table.
If the number of rows in table is more than 500, statistics is updated for every 500+20% of rows changes in table.
Table variable There is no statistics for Table Variables.
Exactly how often you should be updating statistics depends greatly on how much data modification your
indexes and data is receiving.
If there is very little modification (INSERT, UPDATE, DELETE) to the data, then you could have a more infrequent
schedule for the update statistics job.
One way to find out if your statistics are stale is to look at the execution plans and if you estimated rows greatly differ
from your actual rows returned then that is a good indication that the interval needs to be upped.
如果啟用了「自動非同步更新統計資料」後,還是會影響日常的系統操作的話,就只好不要啟用「自動更新
統計資料」
,而在離峰時間,設定排程去「更新統計資料」
。