当前位置:网站首页>Sqlserver queries which indexes are underutilized
Sqlserver queries which indexes are underutilized
2022-07-02 16:08: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 Number of searches performed by user queries .
user_scans bigint not used “seek” Number of scans of user queries for predicates .
user_lookups bigint The number of bookmark lookups performed by user queries .
user_updates bigint The number of updates performed through user queries . This includes “ Insert ”、“ Delete ” and “ to update ”, The operand representing the incomplete actual line . for example , If you delete 1000 That's ok , Then this count is incremented 1
The user_updates Columns are inserted on the underlying table or view 、 The maintenance counter of the index caused by the update or delete operation . You can use this view to identify indexes that are rarely used by applications . You can also use this view to identify the indexes that cause maintenance overhead . You may want to delete indexes that incur maintenance costs but are not used for queries or are only occasionally used for queries .
USER_SEEKS,
USER_SCANS,
USER_LOOKUPS Are all 0, Indicates that the index has not been used for a long time , You can delete .
边栏推荐
- After the win10 system is upgraded for a period of time, the memory occupation is too high
- Storage, reading and writing of blood relationship data of Nepal Graph & Data Warehouse
- 源码look me
- 隐藏在 Nebula Graph 背后的星辰大海
- 结构体的内存对齐
- Maui learning road (III) -- in depth discussion of winui3
- Pyobject to char* (string)
- Lseek error
- Solve * * warning * *: your ApplicationContext is unlikely to start due to a @componentscan of the defau
- Register as a harmonios developer and install deveco studio 3.0 beta2 for harmonios
猜你喜欢
Another graduation season
The outline dimension function application of small motherboard
中科大脑知识图谱平台建设及业务实践
Comparison between rstan Bayesian regression model and standard linear regression model of R language MCMC
Experiment collection of University "Fundamentals of circuit analysis". Experiment 4 - Research on linear circuit characteristics
IDEA中设置背景图片(超详细)
潘多拉 IOT 开发板学习(RT-Thread)—— 实验2 RGB LED 实验(学习笔记)
数仓中的维度表与事实表
Aike AI frontier promotion (7.2)
蚂蚁集团大规模图计算系统TuGraph通过国家级评测
随机推荐
潘多拉 IOT 开发板学习(RT-Thread)—— 实验2 RGB LED 实验(学习笔记)
AWS virtual machine expansion
(Wanzi essence knowledge summary) basic knowledge of shell script programming
Compress words (kmp/ string hash, double hash)
Best practices for building multi architecture images
Comparison between rstan Bayesian regression model and standard linear regression model of R language MCMC
Practice of constructing ten billion relationship knowledge map based on Nebula graph
Memory alignment of structure
Experiment collection of University "Fundamentals of circuit analysis". Experiment 7 - Research on sinusoidal steady-state circuit
Traversal before, during and after binary tree
Moveit 避障路径规划 demo
Experiment collection of University Course "Fundamentals of circuit analysis". Experiment 5 - Research on equivalent circuit of linear active two terminal network
Recommended practice sharing of Zhilian recruitment based on Nebula graph
After the win10 system is upgraded for a period of time, the memory occupation is too high
IDEA中设置背景图片(超详细)
多数据源配置代码
Write your own CPU Chapter 11 - learning notes
Maui learning road (III) -- in depth discussion of winui3
SQL modification statement
Digital collection system development (program development) - Digital Collection 3D modeling economic model system development source code