Learn VisualLearn SQL

Choose How to Match Keys

The same SQL JOIN can use different internal algorithms. A nested loop compares rows in turn, a hash join uses keys to look up matching rows, and a merge join advances while comparing two sorted key streams.

GOAL

Explain the difference between nested-loop, hash, and merge joins.

Which method builds a hash table of keys and probes it for matches?