Clustered vs. Nonclustered Index Structures in SQL Server

2024 ж. 20 Мам.
640 178 Рет қаралды

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:
kzhead.info?...
Read additional content on my blog:
voluntarydba.com
Follow on Twitter:
/ voluntarydba
Like on Facebook:
/ voluntarydba

Пікірлер
  • No nonsense talk or waste of time. Straight to the point with excellent presentation examples. Good Work. Thank you very much.

    @nonam72@nonam722 жыл бұрын
  • 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.

    @abhiramm4941@abhiramm4941 Жыл бұрын
    • Is it just me or did his eyebrows grow, during the course of this video and its edits?

      @ColonelStraker@ColonelStraker7 ай бұрын
  • Never before did Nicolas cage explain something so well, good job Nic. joking :D it was so helpful. thanks.

    @sharaf515@sharaf5158 жыл бұрын
    • +Abd El-Rahman Ibn Omar lol

      @VoluntaryDBA@VoluntaryDBA8 жыл бұрын
    • kkkkkkkkkkkkkk

      @diasneto5231@diasneto52317 жыл бұрын
    • And Nicolas Cage old has an odd sort of hottness. :)

      @doumkatekz@doumkatekz5 жыл бұрын
    • HahhHahahah XD exactly

      @diananggriawanh8202@diananggriawanh82025 жыл бұрын
    • ha!!

      @learningearning8385@learningearning83854 жыл бұрын
  • I've watched over 10 video. This is by far the most clear structured introduction to indexes! Thank you!

    @lorraineliu8422@lorraineliu84225 жыл бұрын
  • Man, you fully rocked on demonstration the difference between Clustered Index and non-clustered Index ! This helps me on preparing for the interview questions !

    @edwardsun4079@edwardsun40799 жыл бұрын
  • 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!

    @falxonPSN@falxonPSN2 жыл бұрын
  • 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.

    @Alstash@Alstash11 ай бұрын
  • 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.

    @michaelgebreselassie99@michaelgebreselassie997 жыл бұрын
  • 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!

    @jonobaker@jonobaker6 жыл бұрын
  • I always come back to this video when I need a refresher and it never fails to help me. Thanks again!

    @CorbinBohne@CorbinBohne4 жыл бұрын
  • Great explanation! This is the type of explanation that every developer can understand, no matter their programming level

    @xphon12@xphon123 жыл бұрын
  • 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 (:

    @radekou@radekou9 жыл бұрын
  • Thank you for painting and diving deep in details of indexes!

    @TheGothicSecret@TheGothicSecret9 жыл бұрын
  • This has been a great straightforward video that really helped explain the difference. Thank you keep up the good work!

    @mike_yon@mike_yon6 жыл бұрын
  • Thank you so much for posting this! I was having a hard time understanding the differences between the two until i watched the video.

    @vincewon8591@vincewon85917 жыл бұрын
  • Really amazing, I was not aware that we can define type of index while applying primary key or unique constraints. thanks for amazing explanation :)

    @ashish7459@ashish74599 жыл бұрын
  • wow....best explanation. I'm studying for the mcsa exam. I've been struggling with this topic. thanks!!

    @danm2756@danm27568 жыл бұрын
  • Great video, thank you for creating this and explaining the concepts in a concise and visual manner.

    @NatashaSalam@NatashaSalam8 жыл бұрын
  • 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.

    @camelCased@camelCased8 жыл бұрын
  • really awesome explanation of a concept that I come across every day that has perplexed me to date... thank you sir !

    @glebski1531@glebski15319 жыл бұрын
  • 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.

    @nkproductions742@nkproductions7424 жыл бұрын
  • I know this has been up for 6 years but THANK YOU!!!!

    @amaxamon@amaxamon3 жыл бұрын
  • Wow, I could not image a man can explain it in such a simple way! Thank you!

    @kezhan01@kezhan018 жыл бұрын
  • Never get this clear until this video. Nice!

    @ommi3756@ommi37569 жыл бұрын
  • Perfectly concise and to the point. Well articulated and the visualizations help dramatically. Thank you very much for your contribution to the DATA world :)

    @mikedaniels755@mikedaniels7554 жыл бұрын
  • Best indexing explanation I've seen on internet.

    @Devilfairy1@Devilfairy16 жыл бұрын
  • 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

    @jacksrensen4475@jacksrensen44752 жыл бұрын
  • Perfect explanation I've ever seen before! Please do not stop!

    @ArtemMikhaylov@ArtemMikhaylov7 жыл бұрын
  • Very helpful especially the way you explain and display the concept.

    @Yousafkhan-gv7cs@Yousafkhan-gv7cs9 жыл бұрын
  • Excellent explanation. I don't think this can be described any better. Great visuals. Thank you so much

    @srapdy6960@srapdy69606 жыл бұрын
  • Most concise and easy to understand video out there. Thx man!

    @ladhkay@ladhkay4 жыл бұрын
  • the best tutorial i have ever seen for MS SQL indexes, good job my friend

    @MegaSmsm2011@MegaSmsm201110 жыл бұрын
    • Thank you very much! I'm glad it helped you.

      @VoluntaryDBA@VoluntaryDBA10 жыл бұрын
  • great visual representation and model choice. subscribed!

    @hello-again6994@hello-again69947 жыл бұрын
  • its simple to understand with graphical representation. Keep up with them. Great work.

    @Akshay-Raut@Akshay-Raut7 жыл бұрын
  • Thank you!! I particularly liked your examples and your methodical delivery of the information. I found the examples to be very helpful as well!

    @TheJimboNJ@TheJimboNJ6 жыл бұрын
  • This is all I was looking for. Best explanation about behind the scenes of indexing.

    @akashverma1640@akashverma1640 Жыл бұрын
  • 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!

    @bobbysugianto5744@bobbysugianto57445 жыл бұрын
  • Awesome presentation, looking forward to watching more of your presentation.

    @ssaraswatipura@ssaraswatipura9 жыл бұрын
  • it can't be better explained, excelent work

    @ezequiel_code@ezequiel_code7 жыл бұрын
  • Thank you so much, I never forget concept because of your visual representation. It made me to understand , very clearly

    @mallaiahsomula1714@mallaiahsomula17144 жыл бұрын
  • This is very useful. I now understand non-clustered indexes. Thank you

    @ckeveny1@ckeveny19 жыл бұрын
  • Very well illustrated and explained thoroughly. Well done.

    @TijiMathewrjj@TijiMathewrjj7 жыл бұрын
  • This man knows what he talks about - great. Waiting other videos.

    @mehdizeynalov1062@mehdizeynalov1062 Жыл бұрын
  • 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.

    @condemned8916@condemned89167 жыл бұрын
  • Great stuff about indexes.. Thanks for uploading.

    @peeyar2000@peeyar20009 жыл бұрын
  • Thanks for explaining, i appreciate your effort.

    @csmanul@csmanul9 жыл бұрын
  • One of the best tutorials I've ever seen. Thank you so much. Brief and infomative. Animations are very helpful also.

    @serhankars@serhankars10 жыл бұрын
    • You're welcome!

      @VoluntaryDBA@VoluntaryDBA10 жыл бұрын
  • Very useful, thanks for making the video and explaining the concepts so well!

    @RucuryBeans@RucuryBeans6 жыл бұрын
  • you have saved my life !!!!! genius explanation. I have been struggling to understand this for months after months

    @js34lee@js34lee6 жыл бұрын
  • Bravo! That is most succinct explanation of clustered indexes I have ever read or seen. I've got it now :-)

    @tommccann3559@tommccann35599 жыл бұрын
  • Never it was explained so well by others. Thank you !!!

    @AC-ft6mx@AC-ft6mx3 жыл бұрын
  • Nicely put.. Specially graphical visual are the one which makes one understand much better .. .Thank you so much ...

    @pradeepdesai9952@pradeepdesai99529 жыл бұрын
  • Excellent video. Much easier with visuals than reading articles. Keep up the good work.

    @manasr3969@manasr39695 ай бұрын
  • Excellent video. Finally I could find a video which is so crisp and clear. Thanks a ton!!

    @akankshakaul744@akankshakaul744 Жыл бұрын
  • Wow, Excellent content and animation. Thank you!!

    @KanagaveluSugumar@KanagaveluSugumar8 жыл бұрын
  • Great video, very well put together and simplifies the topic well.

    @Jemmeh@Jemmeh9 жыл бұрын
  • 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.

    @Major_Mason@Major_Mason5 жыл бұрын
  • Very consistent video. I hope you will add more on this topic. thank you very much

    @roidelalune01@roidelalune019 жыл бұрын
  • I had a hard time understanding the difference until I watched your video. Thanks for the simple explanation!

    @imrana.8370@imrana.83703 ай бұрын
  • 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 (:

    @troop53no@troop53no5 күн бұрын
  • 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.

    @sathwicksv@sathwicksv3 жыл бұрын
  • That was so helpful. Thank you for the clear explanation.

    @caginbektas@caginbektas5 жыл бұрын
  • Great work, learned quite a lot about such a important topics in database the slides and visual explanation was piece of master piece

    @GhOnAu@GhOnAu8 ай бұрын
  • You are so chill bro, thanks for the video.

    @khaleda4873@khaleda48733 жыл бұрын
  • 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! :)

    @tehawes0mesauce@tehawes0mesauce8 жыл бұрын
  • 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.

    @georgesmith9178@georgesmith91787 жыл бұрын
  • The best explanation of the indexes in SQL thank you so much

    @programmingbeasts4649@programmingbeasts46494 жыл бұрын
  • Nice, clear delivery, good explanation. And he said "zed"! He speaks proper English..!

    @jaquesaulait@jaquesaulait6 жыл бұрын
  • Precise and very well explained.

    @nasarazam@nasarazam9 жыл бұрын
  • Thank you ...very help full and wonderful demo..we are expecting to see more demos off SQL server from you..

    @nareshnama343@nareshnama3436 жыл бұрын
  • Nice Video, The way he explaining is extraordinary

    @pradeepn6328@pradeepn63287 жыл бұрын
  • Best explanation with visuals. Kudos!!

    @kamalbalasubramanian621@kamalbalasubramanian6215 жыл бұрын
  • I went through many other tutorials, this one really stands out

    @marcchen4574@marcchen45748 жыл бұрын
  • Buena explicacion, estoy dando mis primeros pasos en SQL server, y tu explicación me aclaro muchas dudas

    @user-ij2xw5qv6m@user-ij2xw5qv6m10 ай бұрын
  • Awesome tutorial, Visualised and explained well, Fantastic, Many thanks

    @mohsenhs@mohsenhs7 жыл бұрын
  • Great Explanation and analogy about clustered-indexes 5 star!

    @williamchin-fook8097@williamchin-fook80977 жыл бұрын
  • This is awesome, I referred lost video but this one really hits me. This is next level explanantion.

    @pjkumar5016@pjkumar50164 ай бұрын
  • The models you used were great! Thanks!

    @DownBeatTime@DownBeatTime5 жыл бұрын
  • Very useful video! Your visual graphics made it very simple to understand. Thanks :)

    @pedropinto2192@pedropinto21925 жыл бұрын
  • Thanks for posting! I learned a lot!

    @HerdingDogRescuer@HerdingDogRescuer7 жыл бұрын
  • the best helpful video i found about cluster index. thanks much.

    @frankzhang105@frankzhang1054 жыл бұрын
  • crystal clear....thank you so much for the video

    @avinashaneesha@avinashaneesha9 жыл бұрын
  • Great video on cluster and non-cluster index

    @ujjvalsharma5055@ujjvalsharma50553 жыл бұрын
  • 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!

    @reinersitanggang@reinersitanggang7 жыл бұрын
  • this is so good an explanation, I love you!!! good mate and good job.

    @koalasy2011@koalasy20116 жыл бұрын
  • Very good explanation of the subject.. Thank you

    @brendaolson5912@brendaolson59127 жыл бұрын
  • Brilliant explanation. Well done, thank you.

    @peterpanagopoulos9733@peterpanagopoulos97334 жыл бұрын
  • Thank you so much for the super clear explaination!

    @tuanleanh6081@tuanleanh6081 Жыл бұрын
  • Wow! Best explaining ever!

    @angelogramatica9967@angelogramatica99678 жыл бұрын
  • Thank you so much ! You are amazing. Everything is explained so organized

    @xiaoyi7538@xiaoyi75383 жыл бұрын
  • very good! much better then others I've watched

    @pablocazares4521@pablocazares45217 жыл бұрын
  • Best explanation i have seen for this topic. Thumbs up man.

    @gauravbabbar9808@gauravbabbar98085 жыл бұрын
  • Thanks friend, that was a clear and concise explanation with excellent graphics.

    @michaelkennedy5126@michaelkennedy51264 ай бұрын
  • Great Stuff. Nice Explanation. Thanks

    @dineshsekar156@dineshsekar1569 жыл бұрын
  • I understood more from this video than from a whole semester of lectures. Thanks!

    @indric@indric10 жыл бұрын
    • You're very welcome! I'm glad it helped you understand these concepts.

      @VoluntaryDBA@VoluntaryDBA10 жыл бұрын
  • Thank you for this explanation.

    @Fhwoarang@Fhwoarang Жыл бұрын
  • Excellent demonstration.

    @INvestYOU@INvestYOU9 жыл бұрын
  • Thanks for you reply. Waiting for you video on Execution plan.

    @abhisekmohanty1371@abhisekmohanty13719 жыл бұрын
  • Really helpful video with simple examples

    @phani404@phani4046 жыл бұрын
  • Thank you so much for such a great explanation!

    @dedeeee617@dedeeee6173 жыл бұрын
KZhead