Went through in Safari. Here are a few reading notes... What are
the different types of joins? - nested loop join: the most
intuitive one. This is the sort of join you would write if you
were to code it in C++: iterate over the smallest table first
and for each row, look for a match in the other table. Efficient
only if the first input is small, and the second is large and
indexed. - hash join: used if the largest input is not indexed.
This is done in two steps: step 2: go through the second input
row by row. For each value in the joined column, work out the
index to the bucket in the hash table using the hash function.
If a row is present, then there is a match and the row is kept
in the result set. - merge join: used if an index exists on the
join columns of both tables. The join columns are sorted in both
tables using the indexes. Then comparing columns is relatively
fast because it takes advantage of the ordering. - If a table
does not have a clustered index, data pages are on the heap. -
If a table has a