Queries Using Specific Index - SQL in Sixty Seconds 180

preview_player
Показать описание
Let us find queries used by the specific indexes.

Code used in Video:

Unused Index Script:

Missing Index Script:

0:00 Intro
0:26 Real World Scenario
0:47 Demo: Queries Using Specific Index
1:42 Summary

#SQLServer #PerformanceTuning #SQLAuthority
Рекомендации по теме
Комментарии
Автор

Hey Pinal...been reading your posts for about 10 years and just found your channel. Your information is always simple and straightforward. Thanks for all the years of help! Great video

craigdubin
Автор

I remember reading your SQL blog channel whenever I had any SQL query and now through this channel still learning and in such a quick time. Thank you for such great content, clear and crisp explanation.

mitulbirla
Автор

Thanks Dave. Using this to determine unused indexes in a non-production scenario requires that you exercise your database, running all the queries needed to gain results with good and/or complete coverage of your indexes, depending on your scenario.

SHADOW
Автор

Thank you Sir. I have used your tips to help show my customers different aspects of their database. This will be another!

urthetshirtguy
Автор

Nice demo, Pinal. Thanks for the code sample!

tasmanedgemusic
Автор

We've been following you since years and reaching out to your website to see the tips whenever we're stuck even during the critical production hours... And you'd never let us down... :-D Thanks for the consistency Pinal!!! And All The Best for your first YouTube Live tomorrow... No need to be nervous, it's a cakewalk for you...

MayurKashikar
Автор

Many thanks Pinal, you are lifesaver !!

lifeisagame
Автор

Your tips are always helpful - Thank you for sharing this particular tip :)

mindymanix
Автор

Morning Pinal... thanks for the movie and code!

dusseljeef
Автор

Keep these coming. I love being able to learn something in such a short time.

go-live
Автор

As always great content! Thank you for your dedication!

thearchibaldtuttle
Автор

@pinal, i was searching this query.i got it now.thank you so much

arunkumarperumal
Автор

Thanks for the info on this, it helps a lot to have a simple query that gives you insight.

ismamad
Автор

Great content in less time....
Thank you so much....!

qwermngh
Автор

Very useful video. You know a lot of real-world index things that have helped me. For example, I used to think that unused and duplicate indexes were just a waste of disk and hurt data change performance (insert, update, delete). You showed us that these can hurt SELECT performance too!
This video is helpful as it has tips on how to find out what query is using an index. Something to note though - I THINK (I have not tested this) that if the database is configured to optimize for ad-hoc queries, you would need to run your first 2 selects twice before running the index lookup script, right?

briangale
Автор

This query will give output for unused indexes also as query plan is using statistics for building a plan

rbsuny
Автор

New to the channel. Great valuable info!

shipshupe
Автор

Very nice tips. Make a tip in row level locking

murugesankgm
Автор

Hi Pinal, thanks very useful query. ... I tried it in several databases. But in one it gave me the following error: Msg 6335, Level 16, State 102, Line 3 XML datatype instance has too many levels of nested nodes. Maximum allowed depth is 128 levels. ...it can be fixed?

mariaocana
Автор

This is helpful. Can this be used in conjunction with identifying stale indexes, or is that basically redundant...?

groucho