gdufo

 

SQL-Server查询失效索引

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;
================================
CREATE NONCLUSTERED INDEX IX_Kq_RecordQk_QKRMan
     ON Kq_RecordQk ([QKRMan])
     include([COMP_CODE], [QKREMPID], [ApStatus])

posted on 2014-02-27 08:53 gdufo 阅读(965) 评论(0)  编辑  收藏 所属分类: Database (oracle, sqlser,MYSQL)


只有注册用户登录后才能发表评论。


网站导航:
 

导航

统计

常用链接

留言簿(6)

随笔分类

随笔档案

文章分类

文章档案

收藏夹

Hibernate

友情链接

搜索

最新评论

阅读排行榜

评论排行榜