Run it in the database: statistics that are more than 7 days old or have had more than 20% of rows changed since they were last updated. Read-only, changes nothing. Tested on SQL Server 2017 and 2025.
-- 05_Statistics_Age.sql - run IN the database: statistics that are old or have had many changes since they were updated. Read-only.
SET NOCOUNT ON;
SELECT OBJECT_SCHEMA_NAME(s.object_id) + N'.' + OBJECT_NAME(s.object_id) AS [table], s.name AS [statistic],
sp.last_updated, sp.rows, sp.rows_sampled, sp.modification_counter,
CONVERT(decimal(6,1), 100.0 * sp.modification_counter / NULLIF(sp.rows, 0)) AS pct_changed
FROM sys.stats AS s CROSS APPLY sys.dm_db_stats_properties(s.object_id, s.stats_id) AS sp
WHERE OBJECTPROPERTY(s.object_id, 'IsUserTable') = 1
AND (sp.last_updated < DATEADD(DAY, -7, GETDATE()) OR sp.modification_counter > 0.2 * sp.rows)
ORDER BY sp.modification_counter DESC;
-- Ola's IndexOptimize with @UpdateStatistics = 'ALL', @OnlyModifiedStatistics = 'Y' keeps these up to date.