查询从未使用的索引

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

SELECT object_name(object_id)
	,* sys.dm_db_index_usage_state
WHERE user_seeks = 0
	AND user_scans = 0
	AND user_lookups = 0
	AND system_seeks = 0
	AND system_scans = 0
	AND system_lookups = 0
	AND object_name(object_id) IS NOT NULL