Advanced SQL
Q90 / 100

What is the difference between a "hash join", "merge join" (sort-merge join), and "nested loop join" as physical join strategies?

Correct! Well done.

Incorrect.

The correct answer is B) They are different algorithms the optimizer may pick to execute the same logical join — nested loop suits small/indexed inputs, hash join builds an in-memory hash table for large unsorted inputs, and merge join exploits pre-sorted inputs

B

Correct Answer

They are different algorithms the optimizer may pick to execute the same logical join — nested loop suits small/indexed inputs, hash join builds an in-memory hash table for large unsorted inputs, and merge join exploits pre-sorted inputs

Explanation

These are physical implementation strategies the query optimizer chooses based on data size, sorting, and indexes available: nested loop suits small/indexed cases, hash join handles large unsorted datasets by hashing one side, and merge join is efficient when both inputs are already sorted on the join key.

Progress
90/100