basically there are three types of joins SQL will do
Nested Loop, Merge & Hash
USUALLY Sql chooses which to use (if you are an old timer like me, you will remember writing code to do your own hash join or hash sort - no fun, believe me). Essentially hash joins are done where there is not a really good way to use the indexes from the tables or the join columns do not match. The hash join is best used when one table is significantly bigger than the other.
Best example of a hash join is a phonebook. You open the book to the correct letter and then start scanning through all of the last names (surnames) to find the one you want. It is a bit more complicated than that (hashing buckets, linked lists...) but this is the general idea.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.