Reset Index Usage Counters

  • Hello, is it possible to reset the Index Usage counters like user_seeks,user_scans,user_lookups etc etc on a production server without restarting the SQL Service?

    thanks

  • Take the DB offline, bring it online. Of course that also kicks all users out, clears the plan cache and the data cache, so may not be desirable.

    Why not save the current values to a permanent table, then later save the values again and compare the two?

    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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I don't want to take a prod DB offline unless I really have to so option two it is.

    thank you for the reply.

  • I could be wrong but I'm sure that between sys.dm_db_index_physical_stats,sys.dm_db_index_operational_stats and sys.dm_db_index_usage_stats - 2 out of the 3 are reset when the indexes are rebuilt. Not 100% sure though

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

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