当前位置:网站首页>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,表示该索引已经很久没用使用,可以删除。
边栏推荐
- (5) Flink's table API and SQL update mode and Kafka connector case
- SQL修改语句
- Locate: cannot execute stat() `/var/lib/mlocate/mlocate Db ': there is no such file or directory
- 数仓中的维度表与事实表
- 数组和链表的区别浅析
- Register as a harmonios developer and install deveco studio 3.0 beta2 for harmonios
- 将点云坐标转换成世界坐标的demo
- Traversal before, during and after binary tree
- PostgresSQL 流复制 主备切换 主库无读写宕机场景
- Song of cactus - throwing stones to ask the way (3)
猜你喜欢
全是精华的模电专题复习资料:基本放大电路知识点
Construction and business practice of Zhongke brain knowledge map platform
Pattern matching extraction of specific subgraphs in graphx graph Computing Practice
可视化技术在 Nebula Graph 中的应用
《大学“电路分析基础”课程实验合集.实验五》丨线性有源二端网络等效电路的研究
隐藏在 Nebula Graph 背后的星辰大海
2020.4.12 byte written test questions B DP D monotone stack
GraphX 图计算实践之模式匹配抽取特定子图
Boot 事务使用
HMS core machine learning service helps zaful users to shop conveniently
随机推荐
解决** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the defau
【5G NR】RRC连接释放
Storage, reading and writing of blood relationship data of Nepal Graph & Data Warehouse
locate: 无法执行 stat () `/var/lib/mlocate/mlocate.db‘: 没有那个文件或目录
[2. Basics of Delphi grammar] 3 Object Pascal constants and variables
Moveit obstacle avoidance path planning demo
Xpt2046 four wire resistive touch screen
SQL FOREIGN KEY
Practice of constructing ten billion relationship knowledge map based on Nebula graph
Conditions and solutions of deadlock
/bin/ld: 找不到 -lxml2
【小白聊云】中小企业容器化改造建议
Experiment collection of University "Fundamentals of circuit analysis". Experiment 6 - observation and measurement of typical signals
ssh/scp 使不提示 All activities are monitored and reported.
Strings and arrays
目标检测—利用labelimg制作自己的深度学习目标检测数据集
/Bin/ld: cannot find -lcrypto
Wavedec2 in MATLAB, talk about the wavedec2 function [easy to understand]
QVariant与Json的各种纠葛——Qt
Usage of group by