To find the last time an object’s stats were updated:
SELECT name AS stats_name,
STATS_DATE(object_id, stats_id) AS statistics_update_date
WHERE object_id = OBJECT_ID(‘Person.Address’);
The STATS_DATE() function is used here to calculate the date in a readable format.
To force an update of statistics run the command below:
UPDATE STATISTICS Production.Product(Products)
WITH FULLSCAN, NORECOMPUTE;
Manually updating statistics is not required, as SQL does this, and also uses these statistics for query optimization.