No video

Differences between Clustered vs Nonclustered Indexes in SQL Server

  Рет қаралды 55,041

Bert Wagner

Bert Wagner

Күн бұрын

Should you use a clustered or a nonclustered index?
When starting out with SQL, you might intuitively know that you should add an index to a table, but you might not be sure what kind of index to add.
In this video we go over the basics of clustered and nonclustered indexes to help you get through index choice paralysis.
Blog post with example queries:
bertwagner.com...
Follow me on Twitter:
/ bertwagner
Want to receive my latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: upscri.be/c77fc8/

Пікірлер: 60
@rondabrown8897
@rondabrown8897 5 жыл бұрын
Finally someone that explains by using realistic and relate-able scenarios...I actually get it now! Thanks
@emiliamatrejek5869
@emiliamatrejek5869 2 жыл бұрын
I went through all videos on KZfaq regarding this topic and finally that's the one that makes it clear to me. Many thanks!
@shaoyizhang
@shaoyizhang 6 жыл бұрын
The mushroom book example is very helpful. Thank you!
@MrShivanand20
@MrShivanand20 5 жыл бұрын
finally, a guy on point.. this was perfect!!
@carloscepeda8663
@carloscepeda8663 4 жыл бұрын
Man, you're my hero, I'm not a database guy but this was so perfectly understandable.
@rabes87
@rabes87 3 жыл бұрын
Dude, this video was 200x more effective than half of the Microsoft press 70-762 textbook. Thank you sooooo much!!
@andyqueiroz
@andyqueiroz 2 жыл бұрын
The better explanation ever found in the hole that are databases
@gotchihaeyo1825
@gotchihaeyo1825 Жыл бұрын
At 7:40, I finally understood the nonclustered index. Thanks.
@navedahmad5353
@navedahmad5353 Ай бұрын
Thanks! for explaining with practical examples
@galaxywalker2976
@galaxywalker2976 3 жыл бұрын
Best explanation on index I have ever watched!
@elinanikolopoulou1769
@elinanikolopoulou1769 Жыл бұрын
Best video i came across so far, for this topic. Great analogies
@aniketdeshmane6569
@aniketdeshmane6569 Жыл бұрын
THANKYOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! You made this so much easy
@cedrics7374
@cedrics7374 5 жыл бұрын
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.
@BoxerDogs
@BoxerDogs 4 жыл бұрын
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 жыл бұрын
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.
@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)
@UmbreonLuv1
@UmbreonLuv1 3 жыл бұрын
Incredibly helpful on the difference between the two, thank you so much!
@yoanadimitrova8760
@yoanadimitrova8760 6 жыл бұрын
Thanks, blue eyes! That was helpful. Can you do a video on ColumnStore Indexes, please?
@elisavetkonstantopoulou5386
@elisavetkonstantopoulou5386 3 жыл бұрын
Thank you so much for this video! You explained the purpose of both types of indexes perfectly!
@nikjojo
@nikjojo 11 ай бұрын
4:55 easily explained
@anitha9006
@anitha9006 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
@almaguapa-sailboatliveaboa440
@almaguapa-sailboatliveaboa440 2 жыл бұрын
Great teacher. Very good to relate an analogy and explain.
@mehdizeynalov1062
@mehdizeynalov1062 2 жыл бұрын
Thank you very much, would be good if some examples were added, maybe it's already there in next videos
@Vasanthkumar-cm8he
@Vasanthkumar-cm8he 5 жыл бұрын
Great work... solves my basic doubts
@seanpaulson9098
@seanpaulson9098 9 ай бұрын
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?
@muchwow3839
@muchwow3839 3 жыл бұрын
FINALLY! An explanation I actually understand lol
@markmatheney8631
@markmatheney8631 Жыл бұрын
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?
@trishlasaxena9970
@trishlasaxena9970 7 ай бұрын
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.
@FlashDark
@FlashDark 7 жыл бұрын
Great review, thanks!
@snake1625b
@snake1625b 2 жыл бұрын
with the cheap cost of storage, is the extra space a unclustered index really that much of a downside?
@oljaivkovic6920
@oljaivkovic6920 5 жыл бұрын
Really well explained, it helped me a lot!! Thanks!
@scottstabbert7966
@scottstabbert7966 2 жыл бұрын
Nice. Clear and succinct! Thanks!
@gladyskiruga9561
@gladyskiruga9561 3 жыл бұрын
This was really helpful. Thank you so much.
@zzhao463
@zzhao463 5 жыл бұрын
fantastically explained!
@cindyt8152
@cindyt8152 Жыл бұрын
This is so clear! thanks!
@TheGates7
@TheGates7 4 жыл бұрын
Maan, this was spot on. Thank YOU
@TheTruthSpeaker0
@TheTruthSpeaker0 2 жыл бұрын
Thanks a lot Bert!
@lucianavasiloiei7864
@lucianavasiloiei7864 2 жыл бұрын
Thank you!
@MrNessuno31
@MrNessuno31 3 жыл бұрын
Absolutely brilliant explanation, thanks Bert!
@MasterCamus
@MasterCamus 4 жыл бұрын
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?
@alexanderkorotkoff2639
@alexanderkorotkoff2639 2 жыл бұрын
Thank you
@jubinsoni4694
@jubinsoni4694 4 жыл бұрын
Great Explanation
@kirankumarkommalapudi9947
@kirankumarkommalapudi9947 6 жыл бұрын
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..
@Genovia816
@Genovia816 3 жыл бұрын
Super Helpful, Thanks
@hnasr
@hnasr 5 жыл бұрын
well said! great video
@katdareshruti
@katdareshruti 3 жыл бұрын
Thank you, thank you, thank you
@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?
@sujinsnair
@sujinsnair 5 жыл бұрын
Very helpful, Thank you
@kundangaikwad8941
@kundangaikwad8941 5 жыл бұрын
Nice explanation..! create more videos on others indexes
@BijouBakson
@BijouBakson Жыл бұрын
thank u
@aaronwhager
@aaronwhager 5 жыл бұрын
Very helpful, thanks.
@aaronwhager
@aaronwhager 5 жыл бұрын
@@DataWithBert Yea man, I just cut a 20+ min query down to 6 seconds by creating a proper non-clustered index! Wow!
@camiloatencio3662
@camiloatencio3662 2 жыл бұрын
SCREAMING AT THE INTRODUCTION
@shreyalande7573
@shreyalande7573 4 жыл бұрын
Outstanding!!!!
@rahulsalunkhe8364
@rahulsalunkhe8364 4 жыл бұрын
Hi please next time please please use some animation or drawing... That will help a lot...
@richardplester
@richardplester 4 жыл бұрын
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 4 жыл бұрын
@@richardplester Hi, at least you can draw on board, C its for better understanding for me..
@ryanbiztech9181
@ryanbiztech9181 3 жыл бұрын
You remind me of the protagonist of Inception
@vittalshanbag2892
@vittalshanbag2892 5 жыл бұрын
Hai sir,Pls provide me with demonstratation of clustered and non clustered index with small examples... Thank you sir
SQL Server Execution Plan Operators
11:15
Bert Wagner
Рет қаралды 23 М.
wow so cute 🥰
00:20
dednahype
Рет қаралды 30 МЛН
Blue Food VS Red Food Emoji Mukbang
00:33
MOOMOO STUDIO [무무 스튜디오]
Рет қаралды 12 МЛН
这三姐弟太会藏了!#小丑#天使#路飞#家庭#搞笑
00:24
家庭搞笑日记
Рет қаралды 70 МЛН
Clustered vs. Nonclustered Index Structures in SQL Server
8:04
Voluntary DBA
Рет қаралды 652 М.
Clustered and nonclustered indexes in sql server   Part 36
16:48
kudvenkat
Рет қаралды 951 М.
Database Clustered vs Non-Clustered Index
8:22
Th30z Code
Рет қаралды 3,7 М.
Azure SQL vs Azure Table Storage
8:09
Bert Wagner
Рет қаралды 10 М.
Database Indexing for Dumb Developers
15:59
Laith Academy
Рет қаралды 53 М.
How do indexes make databases read faster?
23:25
Arpit Bhayani
Рет қаралды 61 М.
Faster database indexes (straight from the docs)
13:28
PlanetScale
Рет қаралды 126 М.
Azure SQL Database: Columnstore indexes | Azure Friday
16:39
Microsoft Azure
Рет қаралды 9 М.
Understanding and using indexes on SQL Server
53:51
Luke Briner
Рет қаралды 24 М.
wow so cute 🥰
00:20
dednahype
Рет қаралды 30 МЛН