Тёмный

Differences between Clustered vs Nonclustered Indexes in SQL Server 

Bert Wagner
Подписаться 15 тыс.
Просмотров 54 тыс.
50% 1

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/2017/09/26/clu...
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/

Наука

Опубликовано:

 

25 сен 2017

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 59   
@rondabrown8897
@rondabrown8897 5 лет назад
Finally someone that explains by using realistic and relate-able scenarios...I actually get it now! Thanks
@shaoyizhang
@shaoyizhang 6 лет назад
The mushroom book example is very helpful. Thank you!
@emiliamatrejek5869
@emiliamatrejek5869 Год назад
I went through all videos on RU-vid regarding this topic and finally that's the one that makes it clear to me. Many thanks!
@MrShivanand20
@MrShivanand20 4 года назад
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 Год назад
The better explanation ever found in the hole that are databases
@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.
@gotchihaeyo1825
@gotchihaeyo1825 Год назад
At 7:40, I finally understood the nonclustered index. Thanks.
@elinanikolopoulou1769
@elinanikolopoulou1769 Год назад
Best video i came across so far, for this topic. Great analogies
@elisavetkonstantopoulou5386
@elisavetkonstantopoulou5386 3 года назад
Thank you so much for this video! You explained the purpose of both types of indexes perfectly!
@galaxywalker2976
@galaxywalker2976 3 года назад
Best explanation on index I have ever watched!
@UmbreonLuv1
@UmbreonLuv1 3 года назад
Incredibly helpful on the difference between the two, thank you so much!
@BoxerDogs
@BoxerDogs 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?
@almaguapa-sailboatliveaboa440
@almaguapa-sailboatliveaboa440 2 года назад
Great teacher. Very good to relate an analogy and explain.
@oljaivkovic6920
@oljaivkovic6920 4 года назад
Really well explained, it helped me a lot!! Thanks!
@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.
@gladyskiruga9561
@gladyskiruga9561 3 года назад
This was really helpful. Thank you so much.
@scottstabbert7966
@scottstabbert7966 2 года назад
Nice. Clear and succinct! Thanks!
@FlashDark
@FlashDark 6 лет назад
Great review, thanks!
@yoanadimitrova8760
@yoanadimitrova8760 6 лет назад
Thanks, blue eyes! That was helpful. Can you do a video on ColumnStore Indexes, please?
@Vasanthkumar-cm8he
@Vasanthkumar-cm8he 4 года назад
Great work... solves my basic doubts
@cindyt8152
@cindyt8152 Год назад
This is so clear! thanks!
@TheGates7
@TheGates7 3 года назад
Maan, this was spot on. Thank YOU
@zzhao463
@zzhao463 4 года назад
fantastically explained!
@aniketdeshmane6569
@aniketdeshmane6569 Год назад
THANKYOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! You made this so much easy
@BoxerDogs
@BoxerDogs 3 года назад
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)
@anshumanbaruah4161
@anshumanbaruah4161 2 года назад
Thanks a lot Bert!
@MrNessuno31
@MrNessuno31 3 года назад
Absolutely brilliant explanation, thanks Bert!
@mehdizeynalov1062
@mehdizeynalov1062 Год назад
Thank you very much, would be good if some examples were added, maybe it's already there in next videos
@jubinsoni4694
@jubinsoni4694 4 года назад
Great Explanation
@muchwow3839
@muchwow3839 3 года назад
FINALLY! An explanation I actually understand lol
@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?
@Genovia816
@Genovia816 3 года назад
Super Helpful, Thanks
@sujinsnair
@sujinsnair 5 лет назад
Very helpful, Thank you
@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..
@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?
@trishlasaxena9970
@trishlasaxena9970 4 месяца назад
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.
@shreyalande7573
@shreyalande7573 3 года назад
Outstanding!!!!
@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!
@kundangaikwad8941
@kundangaikwad8941 5 лет назад
Nice explanation..! create more videos on others indexes
@lucianavasiloiei7864
@lucianavasiloiei7864 Год назад
Thank you!
@katdareshruti
@katdareshruti 3 года назад
Thank you, thank you, thank you
@seanpaulson9098
@seanpaulson9098 7 месяцев назад
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?
@hnasr
@hnasr 4 года назад
well said! great video
@alexanderkorotkoff2639
@alexanderkorotkoff2639 2 года назад
Thank you
@snake1625b
@snake1625b 2 года назад
with the cheap cost of storage, is the extra space a unclustered index really that much of a downside?
@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?
@nikjojo
@nikjojo 8 месяцев назад
4:55 easily explained
@BijouBakson
@BijouBakson Год назад
thank u
@camiloatencio3662
@camiloatencio3662 2 года назад
SCREAMING AT THE INTRODUCTION
@anitha9006
@anitha9006 Год назад
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
@ryanbiztech9181
@ryanbiztech9181 3 года назад
You remind me of the protagonist of Inception
@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..
@vittalshanbag2892
@vittalshanbag2892 4 года назад
Hai sir,Pls provide me with demonstratation of clustered and non clustered index with small examples... Thank you sir
Далее
Мама ударила дочь #shorts #iribaby
00:17
How do indexes make databases read faster?
23:25
Просмотров 47 тыс.
How to Stop Parameter Sniffing in SQL Server
9:07
Просмотров 12 тыс.
Database Clustered vs Non-Clustered Index
8:22
Просмотров 2,4 тыс.
Faster database indexes (straight from the docs)
13:28
Просмотров 124 тыс.
Database Indexing for Dumb Developers
15:59
Просмотров 38 тыс.
SQL Server Execution Plan Operators
11:15
Просмотров 22 тыс.
How do SQL Indexes Work
12:12
Просмотров 568 тыс.
Куда пропал 3D Touch? #apple #iphone
0:51
Просмотров 667 тыс.
Любой звонок в AirPods
0:30
Просмотров 347 тыс.