sqlserver Index Tuning high CPU to perform the analysis server checks [rpm]

SELECT  TOP 10 
        [Total Cost]  = ROUND(avg_total_user_cost * avg_user_impact * (user_seeks + user_scans),0) 
        , avg_user_impact
        , TableName = statement
        , [EqualityUsage] = equality_columns 
        , [InequalityUsage] = inequality_columns
        , [Include Cloumns] = included_columns
FROM        sys.dm_db_missing_index_groups g 
INNER JOIN    sys.dm_db_missing_index_group_stats s 
       ON s.group_handle = g.index_group_handle 
INNER JOIN    sys.dm_db_missing_index_details d 
       ON d.index_handle = g.index_handle
ORDER BY [Total Cost] DESC;

Since the name of Microsoft's very straightforward, direct call missing_index, is sqlserver through analysis of these fields and query processing is the most time-consuming, plus non-clustered index on the field that contains the best in the EqualityUsage. When used after the first few several of several orders of magnitude. plus the index immediately fly.

Transfer from [ https://www.cnblogs.com/qiaqia-liu/p/10687619.html ], thank the original author.

Guess you like

Origin www.cnblogs.com/keepee/p/11880197.html