|< < 28 > >|

Joins

Nested Loops Join

How to rewrite the nested loops join algorithm as an iterator?

Idea 1: Store all the rows in a table

  • open(): Compute the join, and store all the rows in a temporary table.

  • next(): Returns the rows, one on each call.

  • close(): Discard the table.

Relying on the temporary table is undesirable.

|< < 28 > >|