index - last use and update

Hi experts

Please, give me T-SQL
1. Get the last index update date (insert, update, delete)
2. Get the last date of use of the index

What I wish is to determine which indexes are not used to remove
enrique_aeoAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Máté FarkasConnect With a Mentor Database Developer and AdministratorCommented:
There is a built-in report in SQL Server Management Studio for this purpose:
Right click on your database >>> Report >>> Standard reports >>> Index Usage Statistics

In this report you can all the information you requested.

You can access these data with the following DMVs:
SELECT * FROM sys.dm_index_usage_stats
SELECT * FROM sys.dm_db_index_operational_stats (NULL, NULL, NULL, NULL)    

Open in new window

0
 
enrique_aeoAuthor Commented:
the day yesterday was reviewing the url that an expert put it, because they have erased? it could re-post?
0
 
enrique_aeoAuthor Commented:
The links provided were interesting, I need them.

I think if the expert does not put comments, should not eliminate, the expert should add any comments by the link.

Based on your experience, you definitely have the best articles I could find.
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Another blind link comment deleted.
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Enrique, the links provided refers to the two DMV in Máté's comment.
I guess you know how to use a search engine to get more information about those DMV :)
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.

All Courses

From novice to tech pro — start learning today.