Clustered vs. Nonclustered Index Structures in SQL Server

Sdílet
Vložit
  • čas přidán 13. 06. 2024
  • Clustered and nonclustered indexes share many of the same internal structures, but they're fundamentally different in nature. Watch Microsoft Certified IT Professional Jon Seigel explain the similarities and differences of clustered and nonclustered indexes, using a real-world example to show how these structures work to improve the performance of SQL queries.
    Blog post on primary key vs. the clustered index:
    voluntarydba.com/post/2012/10/...
    CREATE INDEX statement reference:
    technet.microsoft.com/en-us/li...
    ALTER INDEX statement reference:
    technet.microsoft.com/en-us/li...
    Index navigation internals by example:
    sqlblog.com/blogs/paul_white/a...
    Sample index data is from the AdventureWorksLT2008R2 sample database:
    awlt2008dbscript.codeplex.com/...
    Visit my channel for more database administration videos:
    / voluntarydba
    Subscribe to get notified about my latest videos:
    czcams.com/users/voluntarydba?...
    Read additional content on my blog:
    voluntarydba.com
    Follow on Twitter:
    / voluntarydba
    Like on Facebook:
    / voluntarydba
  • Věda a technologie

Komentáře • 421

  • @nonam72
    @nonam72 Před 2 lety +33

    No nonsense talk or waste of time.
    Straight to the point with excellent presentation examples.
    Good Work. Thank you very much.

  • @abhiramm4941
    @abhiramm4941 Před rokem +32

    It is hard to believe that this video is from 8 years ago. Still the best video explaining the basics of both these indexes even in 2022.

    • @ColonelStraker
      @ColonelStraker Před 7 měsíci

      Is it just me or did his eyebrows grow, during the course of this video and its edits?

  • @falxonPSN
    @falxonPSN Před 2 lety +33

    This is one of the best videos on this topic out there. Keeps it simple, but still clearly explains the structures and how it works. Very nice work, sir!

  • @lorraineliu8422
    @lorraineliu8422 Před 5 lety +13

    I've watched over 10 video. This is by far the most clear structured introduction to indexes! Thank you!

  • @Alstash
    @Alstash Před rokem +2

    Elegant explanations like this are truly timeless, shifted through a bunch of videos attempting to word this same information in, like, double the time, and yet STILL failed to deliver as well as you did, sir, truly thank you.

  • @sharaf515
    @sharaf515 Před 8 lety +385

    Never before did Nicolas cage explain something so well, good job Nic.
    joking :D it was so helpful. thanks.

  • @edwardsun4079
    @edwardsun4079 Před 9 lety +16

    Man, you fully rocked on demonstration the difference between Clustered Index and non-clustered Index ! This helps me on preparing for the interview questions !

  • @michaelgebreselassie99
    @michaelgebreselassie99 Před 7 lety +1

    I have been looking for different sources just to objectively understand the difference between clustered and non-clustered indexes and to know how they really work. This very short and precise video have put an end to all of my Qs. Thank you.

  • @CorbinBohne
    @CorbinBohne Před 4 lety +1

    I always come back to this video when I need a refresher and it never fails to help me. Thanks again!

  • @xphon12
    @xphon12 Před 3 lety +20

    Great explanation! This is the type of explanation that every developer can understand, no matter their programming level

  • @vincewon8591
    @vincewon8591 Před 7 lety +2

    Thank you so much for posting this! I was having a hard time understanding the differences between the two until i watched the video.

  • @jonobaker
    @jonobaker Před 6 lety +3

    This video helped me ALOT, I've been watching many videos and this really clearly cleaned things up for me. The moving graphics were a big part of that too.
    thankyou!

  • @MegaSmsm2011
    @MegaSmsm2011 Před 10 lety +5

    the best tutorial i have ever seen for MS SQL indexes, good job my friend

    • @VoluntaryDBA
      @VoluntaryDBA  Před 10 lety

      Thank you very much! I'm glad it helped you.

  • @mike_yon
    @mike_yon Před 6 lety +4

    This has been a great straightforward video that really helped explain the difference. Thank you keep up the good work!

  • @amaxamon
    @amaxamon Před 3 lety

    I know this has been up for 6 years but THANK YOU!!!!

  • @nkproductions742
    @nkproductions742 Před 4 lety

    Incredibly beautiful explanation of clustered and non-clustered indexes. There is a lot of material in those first 6 minutes, and I admit I had to pause several times to absorb it and move, but hey who is complaining when you get there eventually.

  • @kezhan01
    @kezhan01 Před 8 lety +1

    Wow, I could not image a man can explain it in such a simple way! Thank you!

  • @mehdizeynalov1062
    @mehdizeynalov1062 Před rokem

    This man knows what he talks about - great. Waiting other videos.

  • @radekou
    @radekou Před 9 lety +61

    Wow, great explanation, love the usage of visualization of the data stored in structures. I've had an idea about how indexes work, but after watching this I'd be able to explain it to my grandmother (:

  • @TheGothicSecret
    @TheGothicSecret Před 9 lety +1

    Thank you for painting and diving deep in details of indexes!

  • @ashish7459
    @ashish7459 Před 9 lety +6

    Really amazing, I was not aware that we can define type of index while applying primary key or unique constraints. thanks for amazing explanation :)

  • @danm2756
    @danm2756 Před 8 lety +3

    wow....best explanation. I'm studying for the mcsa exam. I've been struggling with this topic. thanks!!

  • @imrana.8370
    @imrana.8370 Před 4 měsíci

    I had a hard time understanding the difference until I watched your video. Thanks for the simple explanation!

  • @ommi3756
    @ommi3756 Před 9 lety +1

    Never get this clear until this video. Nice!

  • @serhankars
    @serhankars Před 10 lety +1

    One of the best tutorials I've ever seen. Thank you so much. Brief and infomative. Animations are very helpful also.

  • @kzev
    @kzev Před 10 lety +1

    You are awesome. Without ppl like you I would not have been able to build my skill at this level and get the job I now have. It all goes far. Thank you very much!

  • @akashverma1640
    @akashverma1640 Před rokem

    This is all I was looking for. Best explanation about behind the scenes of indexing.

  • @indric
    @indric Před 10 lety

    I understood more from this video than from a whole semester of lectures. Thanks!

    • @VoluntaryDBA
      @VoluntaryDBA  Před 10 lety

      You're very welcome! I'm glad it helped you understand these concepts.

  • @georgesmith9178
    @georgesmith9178 Před 7 lety +1

    I liked the visualizations best. The phrase "a picture is worth a thousand words" definitely applies to this video.
    Thanks for the concise and well delivered video. And, please, ignore the "Nicolas Cage" references below.

  • @NatashaSalam
    @NatashaSalam Před 8 lety +1

    Great video, thank you for creating this and explaining the concepts in a concise and visual manner.

  • @jacksrensen4475
    @jacksrensen4475 Před 2 lety +1

    Very good explanation ;) My tutors have tried to explain clustering and indexing for me multiple times, without my understanding. But your examples and explanation of the differences really helped

  • @ladhkay
    @ladhkay Před 4 lety +1

    Most concise and easy to understand video out there. Thx man!

  • @Devilfairy1
    @Devilfairy1 Před 6 lety

    Best indexing explanation I've seen on internet.

  • @akankshakaul744
    @akankshakaul744 Před rokem

    Excellent video. Finally I could find a video which is so crisp and clear. Thanks a ton!!

  • @camelCased
    @camelCased Před 8 lety +1

    Thanks for the video, the phonebook example was good and easy to understand.
    From my experience, things sometimes get confusing because of different default behavior of different RDBMS - some automatically create clustered indexes for primary keys, some automatically create indexes on foreign keys, and some don't do any of this. So, sometimes you might get unpleasant surprises and performance issues if you have to deal with a RDBMS which you don't have experience with.

  • @glebski1531
    @glebski1531 Před 9 lety +3

    really awesome explanation of a concept that I come across every day that has perplexed me to date... thank you sir !

  • @ckeveny1
    @ckeveny1 Před 9 lety +1

    This is very useful. I now understand non-clustered indexes. Thank you

  • @AC-ft6mx
    @AC-ft6mx Před 3 lety

    Never it was explained so well by others. Thank you !!!

  • @manasr3969
    @manasr3969 Před 6 měsíci

    Excellent video. Much easier with visuals than reading articles. Keep up the good work.

  • @tehawes0mesauce
    @tehawes0mesauce Před 8 lety +1

    This video might save my advanced databases test grade tomorrow. I hate when the prof. doesn't explain stuff clearly enough for me. Thanks for the video - liked and subbed! :)

  • @TijiMathewrjj
    @TijiMathewrjj Před 7 lety +2

    Very well illustrated and explained thoroughly. Well done.

  • @Yousafkhan-gv7cs
    @Yousafkhan-gv7cs Před 9 lety +1

    Very helpful especially the way you explain and display the concept.

  • @srapdy6960
    @srapdy6960 Před 7 lety +1

    Excellent explanation. I don't think this can be described any better. Great visuals. Thank you so much

  • @tommccann3559
    @tommccann3559 Před 9 lety +1

    Bravo! That is most succinct explanation of clustered indexes I have ever read or seen. I've got it now :-)

  • @troop53no
    @troop53no Před 29 dny

    Thank you! I interact with a SQL database often, but indexes are not something I deal with enough. This was great information and exactly what I needed (:

  • @TheJimboNJ
    @TheJimboNJ Před 6 lety +1

    Thank you!! I particularly liked your examples and your methodical delivery of the information. I found the examples to be very helpful as well!

  • @RucuryBeans
    @RucuryBeans Před 6 lety +1

    Very useful, thanks for making the video and explaining the concepts so well!

  • @Akshay-Raut
    @Akshay-Raut Před 7 lety +1

    its simple to understand with graphical representation. Keep up with them. Great work.

  • @ssaraswatipura
    @ssaraswatipura Před 9 lety +1

    Awesome presentation, looking forward to watching more of your presentation.

  • @js34lee
    @js34lee Před 6 lety

    you have saved my life !!!!! genius explanation. I have been struggling to understand this for months after months

  • @ezequiel_code
    @ezequiel_code Před 7 lety +1

    it can't be better explained, excelent work

  • @roidelalune01
    @roidelalune01 Před 9 lety +1

    Very consistent video. I hope you will add more on this topic. thank you very much

  • @hello-again6994
    @hello-again6994 Před 7 lety +2

    great visual representation and model choice. subscribed!

  • @Jemmeh
    @Jemmeh Před 9 lety +1

    Great video, very well put together and simplifies the topic well.

  • @ArtemMikhaylov
    @ArtemMikhaylov Před 7 lety +8

    Perfect explanation I've ever seen before! Please do not stop!

  • @viveksingh100k
    @viveksingh100k Před 7 lety +1

    Explained in very short time .. Thanks very much :)

  • @khaleda4873
    @khaleda4873 Před 3 lety

    You are so chill bro, thanks for the video.

  • @kamalbalasubramanian621

    Best explanation with visuals. Kudos!!

  • @pradeepdesai9952
    @pradeepdesai9952 Před 9 lety +2

    Nicely put.. Specially graphical visual are the one which makes one understand much better .. .Thank you so much ...

  • @sathwicksv
    @sathwicksv Před 4 lety

    Thank you very much, I have been reading at many places but no one explained with images. Greate video. Even MSDN documentation doesn't have this much information.

  • @KanagaveluSugumar
    @KanagaveluSugumar Před 8 lety +1

    Wow, Excellent content and animation. Thank you!!

  • @pedropinto2192
    @pedropinto2192 Před 5 lety

    Very useful video! Your visual graphics made it very simple to understand. Thanks :)

  • @peeyar2000
    @peeyar2000 Před 9 lety +2

    Great stuff about indexes.. Thanks for uploading.

  • @nareshnama343
    @nareshnama343 Před 6 lety

    Thank you ...very help full and wonderful demo..we are expecting to see more demos off SQL server from you..

  • @Major_Mason
    @Major_Mason Před 5 lety

    I am just starting to learn SQL. My dad is going to give me lessons, but this certainly helped me understand some of the terminology. I figured since I am already a Network Engineer who is two months away from his bachelor's degree, I want to make myself more valuable.

  • @DownBeatTime
    @DownBeatTime Před 5 lety

    The models you used were great! Thanks!

  • @mallaiahsomula1714
    @mallaiahsomula1714 Před 4 lety

    Thank you so much, I never forget concept because of your visual representation. It made me to understand , very clearly

  • @programmingbeasts4649
    @programmingbeasts4649 Před 4 lety

    The best explanation of the indexes in SQL thank you so much

  • @condemned8916
    @condemned8916 Před 7 lety +1

    Sir 5/5 for this video , the visualization was a gr8 help in understanding . I had some knowledge that B-tree was the index data structure but could not grasp it , but after your video it helped me a lot. Plz do post more such videos.

  • @pablocazares4521
    @pablocazares4521 Před 7 lety +1

    very good! much better then others I've watched

  • @gauravbabbar9808
    @gauravbabbar9808 Před 6 lety

    Best explanation i have seen for this topic. Thumbs up man.

  • @caginbektas
    @caginbektas Před 5 lety

    That was so helpful. Thank you for the clear explanation.

  • @jaquesaulait
    @jaquesaulait Před 6 lety

    Nice, clear delivery, good explanation. And he said "zed"! He speaks proper English..!

  • @bobbysugianto5744
    @bobbysugianto5744 Před 5 lety +2

    what a brilliant explanation! subscribed!
    Looking further for your explanation about physical and logical operators in SQL Server and when is the best situation to use it (Nested loops, Hash Match, Merge Join, etc)
    Greetings from Indonesia!

  • @phani404
    @phani404 Před 6 lety

    Really helpful video with simple examples

  • @michaelkennedy5126
    @michaelkennedy5126 Před 5 měsíci

    Thanks friend, that was a clear and concise explanation with excellent graphics.

  • @csmanul
    @csmanul Před 9 lety +2

    Thanks for explaining, i appreciate your effort.

  • @angelogramatica9967
    @angelogramatica9967 Před 8 lety +1

    Wow! Best explaining ever!

  • @brendaolson5912
    @brendaolson5912 Před 7 lety +1

    Very good explanation of the subject.. Thank you

  • @TechnoQuark
    @TechnoQuark Před 3 lety

    Excellent and to the point .... Great Job mate

  • @AlphaWatt
    @AlphaWatt Před 5 lety

    Excellent explanation. This truly helped.

  • @ujjvalsharma5055
    @ujjvalsharma5055 Před 3 lety

    Great video on cluster and non-cluster index

  • @INvestYOU
    @INvestYOU Před 9 lety +1

    Excellent demonstration.

  • @frankzhang105
    @frankzhang105 Před 4 lety

    the best helpful video i found about cluster index. thanks much.

  • @pradeepn6328
    @pradeepn6328 Před 7 lety +1

    Nice Video, The way he explaining is extraordinary

  • @tuanleanh6081
    @tuanleanh6081 Před rokem

    Thank you so much for the super clear explaination!

  • @mvmassoudi
    @mvmassoudi Před 10 lety +1

    Very Professional, clear and informative; I also loved the video animations. Thank you

  • @nasarazam
    @nasarazam Před 9 lety +1

    Precise and very well explained.

  • @fernandomichelbaladitahan3921

    Excelent video, I understood perfectly cluster and non cluster index

  • @xiaoyi7538
    @xiaoyi7538 Před 3 lety

    Thank you so much ! You are amazing. Everything is explained so organized

  • @rajeshpednekar9317
    @rajeshpednekar9317 Před 4 lety

    Nice Simple explaination on Clustered Indexes and Non Clustered ..

  • @RussianVideoPodcast
    @RussianVideoPodcast Před 6 lety

    I finally understood indexes...Very good video! Thank y ou

  • @pjkumar5016
    @pjkumar5016 Před 4 měsíci

    This is awesome, I referred lost video but this one really hits me. This is next level explanantion.

  • @CorbinBohne
    @CorbinBohne Před 7 lety +1

    This is a fantastic explanation that a lowly analyst like me can understand :)

  • @gchora
    @gchora Před 4 lety

    Very nice video! Important topics and very clear. Thank you

  • @mohsenhs
    @mohsenhs Před 7 lety +1

    Awesome tutorial, Visualised and explained well, Fantastic, Many thanks

  • @dineshsekar156
    @dineshsekar156 Před 9 lety +1

    Great Stuff. Nice Explanation. Thanks

  • @naveenkumar7262
    @naveenkumar7262 Před 10 lety +1

    Thanks for this nice video. It was short, simple and easy to understand.
    Thanks again!!

    • @VoluntaryDBA
      @VoluntaryDBA  Před 10 lety

      You're very welcome! Thanks for watching.

  • @optimaliteness
    @optimaliteness Před 2 lety

    Really need to say thanks for this! Finally understood.

  • @reinersitanggang
    @reinersitanggang Před 7 lety +1

    A lot wannabe blogs explained it with much much worse example, even a lot that even do not define from the scanning process through accumulate the results. Nice vid!