r/SQLServer • • Feb 27 '19

SQL Server Indexes – Usage Script (Tutorial)

https://www.youtube.com/watch?v=ekOTr1nrLSA&t=408s
28 Upvotes

9 comments sorted by

4

u/JoshBurnsTech Feb 27 '19

**** Section Times in Video ****
#1: Open the Index Usage Blog Post 0:32
#2: Copy the Index Usage SQL Script 1:39
#3: Paste the SQL Script in SSMS 3:06
#4: Execute the SQL Script 3:21
#5: Modify the WHERE Clause 4:25
#6: Post any Questions! (I will reply) 7:43

2

u/cachedrive Feb 27 '19

Nice - thanks for sharing

4

u/JoshBurnsTech Feb 27 '19

Absolutely! Definitely plan to be a lot more active on here. 😃

2

u/Traust Feb 28 '19

Very useful and right timing too as I have been planning on doing a index maintenance soon. Look forward to more things like this.

1

u/JoshBurnsTech Feb 28 '19

Very useful and right timing too as I have been planning on doing a index maintenance soon. Look forward to more things like this.

Great to hear that! I am working on a new video regarding Missing Indexes, which will be up on the Channel soon as well.

1

u/Traust Feb 28 '19

Will be great if you can keep the scripts somewhat backwards compatible too. I'm still running 2012 and unable to upgrade for a while. :(

1

u/JoshBurnsTech Feb 28 '19

Will be great if you can keep the scripts somewhat backwards compatible too. I'm still running 2012 and unable to upgrade for a while. :(

Absolutely! Did you test the script on your SQL Server Instance? It should definitely be compatible with SQL Server 2012.

1

u/Traust Feb 28 '19

Worked beautifully except for the part where it showed a number of unused indexes with a huge amount of updates.

1

u/JoshBurnsTech Feb 28 '19

Worked beautifully except for the part where it showed a number of unused indexes with a huge amount of updates.

So, yours did not return any Indexes that had a lot of updates?
You may not have any indexes with a lot of updates that are not being used.