Question

I have been using Bart Duncan's classic article to find out what indexes I am missing (http://blogs.msdn.com/b/bartd/archive/2007/07/19/are-you-using-sql-s-missing-index-dmvs.aspx)

Every now when I execute

select * from sys.dm_db_missing_index_details

I get back no rows, where I would have got rows back an hour earlier.

My question is, when do these dmvs get cleared or what sort of time window to they represent?

Thanks for your help

Was it helpful?

Solution

The missing index statistics are flushed from the cache

  1. If there is memory pressure.

  2. If the SQL Server service restarts.

When the metadata for a table changes, all missing index information about that table is deleted from these dynamic management views. Table metadata changes can occur when columns are added or dropped from a table, or when an index is created on a column of a table. Ref.

Also note: if there is little or no activity on the box since the last service restart then there won't be any missing index info gathered.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top