Hash Match Join Internals in SQL Server

preview_player
Показать описание
Hash Match Joins can join almost any data thrown at them. In this video learn about how the hash match join algorithm works and what seeing hash match joins in your execution plans means for performance of your queries.

Related blog post about Hash Match Joins:

Going further in-depth with hash match joins:

Follow me on Twitter:
Рекомендации по теме
Комментарии
Автор

Bert this is the easiest and shortest explanation of Hash Match I've ever seen. Thank you very much!

KristinaMyLife
Автор

Bert your explanation to the various processes is great

singhsVP
Автор

Man, thank you for this series, videos are fantastic! Thank you for saying it as it is, not being vague or keeping it abstract. Your videos have high learning value! Keep up the good work!

stan_likes_single_coils
Автор

Wow, commitment, doing a video on the 2nd!! Hope you had a great festive period. Have a great 2019. Thanks for this series. Internals are always VERY interesting and exciting. You've set the bar pretty high; can't wait to see what comes next!!

zanonilabuschagne
Автор

This video is so good. I was confused in my college database class. But you explain everything clearly! Thank you so much for making this video!

tinghsu
Автор

I'm taking a database course. Your video is pretty helpful to help me understand this stuff.

James
Автор

Thank you, this made it much easier to understand.

odinsrensen
Автор

Also a hash match join can run in batch which can make it quite performant...

chswin
Автор

ok so it seems the advantage of a hash join over a nested loop is that once you've identified a match you don't have to keep iterating since all tuples of that join coindition are in that one bucket is that correct?

chazsmith
Автор

May somebody explain to me why in SQL Server, hash join doesn't preserve order. It clearly can but I don't know why it always needs to re-sort after a hash join.

Pblaze
Автор

What's the time complexity of this? Wikipedia actually doesn't have one on its entry and I couldn't find an authoritative answer elsewhere either.

It seems to me that we have to hash everything in Table1, which is Theta(n). Then, for each record in Table2, we need to do a lookup of the hash structure. So, in the worst case, we need to look at every key in the hash structure. So, assuming both tables have the same number of elements, would it be O(N^2)?

mantistoboggan