当前位置:网站首页>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 .
边栏推荐
- Add user-defined formula (time sharing t+0) to mobile app access as an example
- Construction and business practice of Zhongke brain knowledge map platform
- mysql 计算经纬度范围内的数据
- Idea public method extraction shortcut key
- 结构体的内存对齐
- Astra: could not open "2bc5/ [email protected] /6“: Failed to set USB interface
- Pattern matching extraction of specific subgraphs in graphx graph Computing Practice
- Demo of converting point cloud coordinates to world coordinates
- In memory of becoming the first dayu200 tripartite demo contributor
- End time processing method of wechat v3native payment settings
猜你喜欢

idea 公共方法抽取快捷键

解决** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the defau

Traversal before, during and after binary tree

JS learning notes - process control

原神2.6服务端下载以及搭建安装教程

Idea jar package conflict troubleshooting

Write your own CPU Chapter 11 - learning notes

HMS core machine learning service helps zaful users to shop conveniently

Armv8-a programming guide MMU (4)

数仓中的维度表与事实表
随机推荐
Song of cactus - throwing stones to ask the way (3)
Another graduation season
Pyobject to char* (string)
What are the necessary functions of short video app development?
/Bin/ld: cannot find -lgssapi_ krb5
Comment réaliser un graphique Nebula d'importation CSV hors ligne de niveau milliard
Boot transaction usage
解决** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the defau
End time processing method of wechat v3native payment settings
Maui learning road (III) -- in depth discussion of winui3
day4
beforeEach
智联招聘的基于 Nebula Graph 的推荐实践分享
Armv8-a programming guide MMU (4)
数仓中的维度表与事实表
How to use percona tool to add fields to MySQL table after interruption
Strings and arrays
Aike AI frontier promotion (7.2)
Comparison between rstan Bayesian regression model and standard linear regression model of R language MCMC
Floyed "suggestions collection"