Differences between Clustered vs Nonclustered Indexes in SQL Server

Поделиться
HTML-код
  • Опубликовано: 3 фев 2025

Комментарии • 64

  • @jonathanmaes7120
    @jonathanmaes7120 Месяц назад

    It's 2025 and I'm learning from this channel! Thank you!

  • @rondabrown8897
    @rondabrown8897 5 лет назад +21

    Finally someone that explains by using realistic and relate-able scenarios...I actually get it now! Thanks

  • @emiliamatrejek5869
    @emiliamatrejek5869 2 года назад +3

    I went through all videos on RUclips regarding this topic and finally that's the one that makes it clear to me. Many thanks!

  • @rabes87
    @rabes87 4 года назад +1

    Dude, this video was 200x more effective than half of the Microsoft press 70-762 textbook. Thank you sooooo much!!

  • @shaoyizhang
    @shaoyizhang 7 лет назад +14

    The mushroom book example is very helpful. Thank you!

  • @manlinli401
    @manlinli401 3 месяца назад

    Damn this really explained well for someone like me who doesn't want to dig into the technical details but more from the understanding perspective how these two are different :)

  • @MrShivanand20
    @MrShivanand20 5 лет назад +13

    finally, a guy on point.. this was perfect!!

  • @carloscepeda8663
    @carloscepeda8663 4 года назад +4

    Man, you're my hero, I'm not a database guy but this was so perfectly understandable.

  • @andyqueiroz
    @andyqueiroz 2 года назад

    The better explanation ever found in the hole that are databases

  • @galaxywalker2976
    @galaxywalker2976 3 года назад +1

    Best explanation on index I have ever watched!

  • @gotchihaeyo1825
    @gotchihaeyo1825 2 года назад

    At 7:40, I finally understood the nonclustered index. Thanks.

  • @elinanikolopoulou1769
    @elinanikolopoulou1769 2 года назад

    Best video i came across so far, for this topic. Great analogies

  • @cedrics7374
    @cedrics7374 5 лет назад +1

    Thanks man, I was searching for a good explanation of the differences between both, this was perfect!

  • @robertgaudreau2520
    @robertgaudreau2520 5 лет назад

    Great Bert, very clear explanation on how to use the index.

  • @aniketdeshmane6569
    @aniketdeshmane6569 Год назад +1

    THANKYOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! You made this so much easy

  • @BoxerDogs
    @BoxerDogs 4 года назад

    At 6:35 you give an analogy about a nonclustered index and a clustered index. If I understand what you are saying, are the following statements true:
    - A nonclustered index is like an index at the back of a book, with page numbers (each page number is like a row identifier)
    - A clustered Index is like an index at the back of a book, but no pages numbers (which would seem odd for a book to have)

  • @navedahmad5353
    @navedahmad5353 6 месяцев назад

    Thanks! for explaining with practical examples

  • @BoxerDogs
    @BoxerDogs 4 года назад +3

    Do you have a video that explains the differences between a table scan, index scan and an index seek and when SSMS will use each of these? If not, would you consider doing a video about this?

  • @fadimichael9788
    @fadimichael9788 6 лет назад +2

    A very good video, only part is the example of the clustered index, in my opinion, should be a phone book or dictionary instead of textbook content as the clustered is physically sort/ordered the data, this example very much applied on the no-clustered index. Thanks.

  • @anitha9006
    @anitha9006 2 года назад +2

    Indexes should not be used 1)on small tables 2)tables that have large batch updates or insert operations 3)not be used on tables with high number of null values4)columns that are frequently manipulated

  • @UmbreonLuv1
    @UmbreonLuv1 3 года назад

    Incredibly helpful on the difference between the two, thank you so much!

  • @elisavetkonstantopoulou5386
    @elisavetkonstantopoulou5386 4 года назад

    Thank you so much for this video! You explained the purpose of both types of indexes perfectly!

  • @seanpaulson9098
    @seanpaulson9098 Год назад

    4:05 im confused why a insert would be so slow in this situation.
    Can clustered indexas not be sorted by some sort of tree?

  • @mehdizeynalov1062
    @mehdizeynalov1062 2 года назад

    Thank you very much, would be good if some examples were added, maybe it's already there in next videos

  • @muchwow3839
    @muchwow3839 3 года назад

    FINALLY! An explanation I actually understand lol

  • @nikjojo
    @nikjojo Год назад

    4:55 easily explained

  • @yoanadimitrova8760
    @yoanadimitrova8760 7 лет назад +3

    Thanks, blue eyes! That was helpful. Can you do a video on ColumnStore Indexes, please?

  • @MrNessuno31
    @MrNessuno31 3 года назад

    Absolutely brilliant explanation, thanks Bert!

  • @Vasanthkumar-cm8he
    @Vasanthkumar-cm8he 5 лет назад

    Great work... solves my basic doubts

  • @TheTruthSpeaker0
    @TheTruthSpeaker0 2 года назад

    Thanks a lot Bert!

  • @trishlasaxena9970
    @trishlasaxena9970 Год назад

    this video is really helpful . I have a doubt. If I have defined clustered and non clustered index and we are inserting new row, it will add the newly added row in specific position and shift other rows as per clusterd index. So, how non clustered index is getting benefitted here on inserting new rows. And is that possible to have table without any clustered index.

  • @almaguapa-sailboatliveaboa440
    @almaguapa-sailboatliveaboa440 2 года назад

    Great teacher. Very good to relate an analogy and explain.

  • @scottstabbert7966
    @scottstabbert7966 3 года назад

    Nice. Clear and succinct! Thanks!

  • @gladyskiruga9561
    @gladyskiruga9561 3 года назад

    This was really helpful. Thank you so much.

  • @snake1625b
    @snake1625b 3 года назад

    with the cheap cost of storage, is the extra space a unclustered index really that much of a downside?

  • @cindyt8152
    @cindyt8152 2 года назад

    This is so clear! thanks!

  • @oljaivkovic6920
    @oljaivkovic6920 5 лет назад

    Really well explained, it helped me a lot!! Thanks!

  • @TheGates7
    @TheGates7 4 года назад

    Maan, this was spot on. Thank YOU

  • @markmatheney8631
    @markmatheney8631 2 года назад

    Ummm, regarding multiple nonclustered indexes. You made a comment that occasionally you have added a nonclustered index only to see other nonclustered indexes take a performance hit.
    If each nonclustered index is "independent", how could it effect the performance of other nonclustered indexes?
    When doing a query, doesn't SQL pick the most optimal index, and use that one?
    In other words, I suppose that it SQL "thought" a new nonclustered index was "faster" and used it, I suppose that would be possible, but wouldn't that we a problem with SQL?

  • @MasterCamus
    @MasterCamus 5 лет назад

    So for a report that runs from a SP with a couple of temp tables. Is it better to add cluster index after filling the tables?

  • @FlashDark
    @FlashDark 7 лет назад +2

    Great review, thanks!

  • @samdatta9163
    @samdatta9163 4 года назад

    Good video.it helped me a lot to understand clustered and non clustered index.can u plztell me that ..if i create unique key does it create a non clusterd index or clustred?

  • @kirankumarkommalapudi9947
    @kirankumarkommalapudi9947 7 лет назад

    Nice video.. but my understanding was table of contents also like non clusterd indexes not the clusterd index. Because contents also have just the address of the details in that book. Please correct me if I am wrong. In the video @5.10 min this info mentioned..

  • @tobitikare4152
    @tobitikare4152 Месяц назад

    Getting access denied when trying to view the blog with examples

  • @zzhao463
    @zzhao463 5 лет назад

    fantastically explained!

  • @abhay6276
    @abhay6276 4 месяца назад +1

    Hi bro if you could have explained in practical way it would have been better for all of viewers.

  • @jubinsoni4694
    @jubinsoni4694 4 года назад

    Great Explanation

  • @lucianavasiloiei7864
    @lucianavasiloiei7864 2 года назад

    Thank you!

  • @kundangaikwad8941
    @kundangaikwad8941 5 лет назад

    Nice explanation..! create more videos on others indexes

  • @hnasr
    @hnasr 5 лет назад

    well said! great video

  • @Mona001-01g
    @Mona001-01g 4 года назад

    Thank you, thank you, thank you

  • @aaronwhager
    @aaronwhager 6 лет назад

    Very helpful, thanks.

    • @aaronwhager
      @aaronwhager 6 лет назад

      @@DataWithBert Yea man, I just cut a 20+ min query down to 6 seconds by creating a proper non-clustered index! Wow!

  • @alexanderkorotkoff2639
    @alexanderkorotkoff2639 2 года назад

    Thank you

  • @camiloatencio3662
    @camiloatencio3662 2 года назад

    SCREAMING AT THE INTRODUCTION

  • @shreyalande16
    @shreyalande16 4 года назад

    Outstanding!!!!

  • @BijouBakson
    @BijouBakson 2 года назад

    thank u

  • @ryanbiztech9181
    @ryanbiztech9181 4 года назад

    You remind me of the protagonist of Inception

  • @rahulsalunkhe8364
    @rahulsalunkhe8364 5 лет назад +1

    Hi please next time please please use some animation or drawing...
    That will help a lot...

    • @richardplester
      @richardplester 5 лет назад

      Wow the mushroom book analogy wasn't enough? Just mentally picture a table of contents and an index for a book, failing that rewatch where he flashes those parts of the book :) I'd rather Bert spends time banging out quality info vids rather than labouring on pretty but unnecessary graphics

    • @rahulsalunkhe8364
      @rahulsalunkhe8364 5 лет назад

      @@richardplester Hi, at least you can draw on board, C its for better understanding for me..

  • @vittalshanbag2892
    @vittalshanbag2892 5 лет назад

    Hai sir,Pls provide me with demonstratation of clustered and non clustered index with small examples...
    Thank you sir

  • @sujinsnair
    @sujinsnair 5 лет назад

    Very helpful, Thank you

  • @Genovia816
    @Genovia816 3 года назад

    Super Helpful, Thanks