question

sql_crazy avatar image
sql_crazy asked

user defined Indexes added manually

Hi Experts, Please let me know the query to list the all the indexes which are user defined in the last 5 years, as there are so many indexes on application level just i am looking for the indexes which are added manually from backend at database level. Thanks in advance
indexes
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
anthony.green avatar image
anthony.green answered
There is no way to get the date created for an index other than a Primary Key or Unique key as those two are constraints and will have a record in sys.objects. sys.indexes doesn't have a creation column so you will need to write an routine which recognizes CREATE INDEX commands and creates a log going forward. There is also no way to differentiate an index created by a user or by the application.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sql_crazy avatar image sql_crazy commented ·
Thanks Antony for the answer.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.