High overhead missing index

Time:2020-11-25
select c.unique_ The number of compilations and recompilations that compiles as will benefit from the missing index group,
c.user_ The number of possible uses of lookups after indexing,
c.user_ The number of scans that can be used after the index is created,
c. Statement as table name,
c.equality_columns,
c.inequality_columns,c.included_columns,
c. Name as library name,

c.avg_ total_ user_ Cost as reduced average cost,
c.avg_ user_ Impact as percentage return,
c.last_ user_ The last result will be affected after the use of seek as
from 
(
select a.name,b.* from 
(
select d.*
, s.avg_total_user_cost
, s.avg_user_impact
, s.last_user_seek
,s.unique_compiles
,s.user_seeks
,s.user_scans
from sys.dm_db_missing_index_group_stats s
,sys.dm_db_missing_index_groups g
,sys.dm_db_missing_index_details d
where s.group_handle = g.index_group_handle
and d.index_handle = g.index_handle
--order by s.avg_user_impact desc
) b,
sys.databases a 
where a.database_id=b.database_id
)c
where c.name ='databasename' --DB_NAME(DB_ID())
Order by% revenue DESC, unique_ compiles desc

--4、equality_ Columns: a comma separated list of the columns that make up the equality predicate, that is, which field is missing the index will be listed here (in short, the filter field after where),

--The form of the predicate is as follows: table.column  =constant_ value

--5、inequality_ Columns: a comma separated list of columns that make up unequal predicates, such as predicates in the following form: table.column  > constant_ Any comparison operator other than value "=" indicates inequality.

--6、included_ Columns: a comma separated list of covered columns for the query (in short, the fields after select).