当前位置:网站首页>SQLServer查询哪些索引利用率低
SQLServer查询哪些索引利用率低
2022-07-02 12:39:00 【51CTO】
SELECT OBJECT_NAME(S.[OBJECT_ID]) AS [OBJECT NAME],
I.[NAME] AS [INDEX NAME],
USER_SEEKS,
USER_SCANS,
USER_LOOKUPS,
USER_UPDATES
FROM SYS.DM_DB_INDEX_USAGE_STATS AS S
INNER JOIN SYS.INDEXES AS I
ON I.[OBJECT_ID] = S.[OBJECT_ID]
AND I.INDEX_ID = S.INDEX_ID
WHERE OBJECTPROPERTY(S.[OBJECT_ID],'IsUserTable') = 1
user_seeks bigint 通过用户查询执行的搜索次数。
user_scans bigint 未使用“seek”谓词的用户查询的扫描数。
user_lookups bigint 由用户查询执行的书签查找次数。
user_updates bigint 通过用户查询执行的更新次数。 这包括“插入”、“删除”和“更新”,表示未完成实际行的操作数。 例如,如果在一个语句中删除 1000 行,则此计数递增 1
该 user_updates 列是基础表或视图上插入、更新或删除操作导致的索引的维护计数器。 可以使用此视图确定应用程序极少使用的索引。 还可以使用此视图确定引发维护开销的索引。 您可能要删除引发维护开销但不用于查询或只是偶尔用于查询的索引。
USER_SEEKS,
USER_SCANS,
USER_LOOKUPS均为0,表示该索引已经很久没用使用,可以删除。
边栏推荐
- (万字精华知识总结)Shell脚本编程基础知识
- 【题解】Educational Codeforces Round 82
- [Xiaobai chat cloud] suggestions on container transformation of small and medium-sized enterprises
- floyed「建议收藏」
- 可视化技术在 Nebula Graph 中的应用
- Teach you how to build virtual machines locally and deploy microservices
- Comprehensively interpret the background and concept of service mesh
- Postgressql stream replication active / standby switchover primary database no read / write downtime scenario
- Use ffmpeg command line to push UDP and RTP streams (H264 and TS), and ffplay receives
- Floyed "suggestions collection"
猜你喜欢

win10系统升级一段时间后,内存占用过高
![[5g NR] RRC connection release](/img/f3/a03f5124493b1c03e7336c55871330.png)
[5g NR] RRC connection release

The sea of stars hidden behind the nebula graph

idea 公共方法抽取快捷键

Boot 事务使用

Ant group's large-scale map computing system tugraph passed the national evaluation

idea jar包冲突排查

【5G NR】RRC连接释放

隐藏在 Nebula Graph 背后的星辰大海

Experiment collection of University "Fundamentals of circuit analysis". Experiment 4 - Research on linear circuit characteristics
随机推荐
《大学“电路分析基础”课程实验合集.实验五》丨线性有源二端网络等效电路的研究
Wise target detection 23 - pytoch builds SSD target detection platform
(5) Flink's table API and SQL update mode and Kafka connector case
Boot 事务使用
Recommended practice sharing of Zhilian recruitment based on Nebula graph
Experiment collection of University Course "Fundamentals of circuit analysis". Experiment 5 - Research on equivalent circuit of linear active two terminal network
微信v3native支付设置的结束时间处理办法
全方位解读服务网格(Service Mesh)的背景和概念
构建多架构镜像的最佳实践
[development environment] install Visual Studio Ultimate 2013 development environment (download software | install software | run software)
[idea] recommend an idea translation plug-in: translation "suggestions collection"
SQL FOREIGN KEY
/bin/ld: 找不到 -lxml2
fastjson List转JSONArray以及JSONArray转List「建议收藏」
《大学“电路分析基础”课程实验合集.实验六》丨典型信号的观察与测量
Introduction to dynamic planning I, BFS of queue (70.121.279.200)
Construction and business practice of Zhongke brain knowledge map platform
愛可可AI前沿推介(7.2)
源码look me
仙人掌之歌——投石问路(3)