• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • 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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

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