Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can you explain what is a hash join 2

Status
Not open for further replies.

2314

Programmer
May 19, 2001
69
IN
can you explain what is a hash join
 
BOL has a very nice explanation of HASH joins and how they differ from merge joins.

If you need translations of what they said, let me know.
 
ya can you please simplify it for me
 
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.

need more?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top