I queried the "index usage stats" DMV and got开发者_如何学Go the following result
obj_id:789577851 tab_name:TableX index_id:0 index_name:HEAP user_seeks:0 user_scans:3139598 user_lookups:1237467 user_updates:0
This table does not have any clustered index.
I also looked up the "missing index" DMV but found no entries for "TableX", so that means sql server doesn't think i need to create an index on this table. But there are too many scans and lookups !
I would like to know how should i determine what index is needed to be created to reduce the scans and or lookups ?
There is a useful article at Bart Duncan's SQL Weblog which shows how this dmv can be joined to give actual create index statements. It also filters our less important entries in the DMVs.
Hope this is what you were looking for.
精彩评论