Skip to content

Join

Nested Loop

  • Chosen very typically when multiple values have to be compared.

Pseudo-Code

For each pair \(P = (R_i, R_j)\) in the cartesian product, if \(P\) satisfies predicate \(\theta\), select P. else, do nothing.

Block Nested Loop

  • Similar to nested loop, but compares block by block as well

Pseudo-Code

For each block pair \(B = (B_r, B_s)\), For each record pair \(P = (R_i, R_j)\), If \(P\) satisfies predicate \(\theta\), select P. else, do nothing.