문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top