Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 270
  • Last Modified:

How Can You Find Out If An Index Is Being Used Or Not In SQL Server?

Is there a way to detect and or gather information that show what indexes are being used and how often the are being used in a SQL Server database?
0
Omega002
Asked:
Omega002
1 Solution
 
Forefront_Data_SolutionsCommented:
If you are using SQL Server 2005 or later, there are some useful queries you can use.  Check these out:
http://www.mssqltips.com/tip.asp?tip=1239
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
if you haven't restarted your system for a while the following script will list out the indexes, you have to monitor them for few days bbefore you delete

 SELECT   * FROM      sys.indexes idx          JOIN      sys.dm_db_index_usage_stats ius ON idx.object_id = ius.object_id                                                       AND idx.index_id = ius.index_id          WHERE     idx.type_desc = 'nonclustered'                    AND ius.user_seeks = ( SELECT   MAX(user_seeks)                                           FROM     sys.dm_db_index_usage_stats                                           WHERE    object_id = ius.object_id                                                    AND type_desc = 'nonclustered' )      
0
 
SharathData EngineerCommented:
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Omega002Author Commented:
can I also see this over a period of time like for the last 3 months?
0
 
Omega002Author Commented:
Is there a way to capture Index usage in SQL Server Over a daily, weekly, monthly and quarterly period?
0
 
SharathData EngineerCommented:
No, you cannot. On a regular basis, if you can save the result of the query mentioned in the URL  to a temp table, you can have the history.
0

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now