sp_updedatestats

  • Is there a way to see when the last time a table had the statistics updated on it?

  • DBCC SHOW_STATISTICS

  • To see just the data and time of when the statistics were last updated, you can use the STATS_DATE() function. The query below will list all the indexes and date the statistics were last updated for each index:

    USE [Your Database]

    SELECT 'Index Name' = i.name,

    'Statistics Date' = STATS_DATE(i.id, i.indid)

    FROM sysobjects o, sysindexes i

    WHERE o.name = 'Your Table' AND o.id = i.id

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply