Patent ID: 8126905

Claim:
A method of optimizing processing of a join operation in a parallel processing system, comprising: receiving an outer join operation on a first table and a second table that includes a first join predicate that includes at least one attribute of the first table and a second join predicate that includes at least one attribute of the first table and the second table; scanning, by a plurality of processing modules of the parallel processing system, the first table; placing, by a first set including at least one processing module of the plurality of processing modules, rows of the first table that satisfy the first join predicate in a respective first spool allocated to the first set including at least one processing module; placing, by a second set including at least one processing module of the plurality of processing modules, rows of the first table that do not satisfy the first join predicate in a respective second spool allocated to the second set including at least one processing module; redistributing, by the first set including at least one processing module of the plurality of processing modules, each row of the first spool to a corresponding processing module based on the at least one attribute of the second join predicate of each row; redistributing, by at least one allocated processing module of the plurality of processing modules, each row of the second table to a corresponding processing module based on the at least one attribute of the second join predicate; placing, by a third set including at least one processing module of the plurality of processing modules, each row of the first spool redistributed to the third set in a third spool allocated to the third set including at least one processing module; placing, by a fourth set including at least one processing module of the plurality of processing modules, each row of the second table redistributed to the fourth set in a fourth spool allocated to the fourth set including at least one processing module; performing, by a fifth set including at least one processing module of the plurality of processing modules, a left outer join operation on tables represented by rows of the third and fourth spools allocated to the fifth set; and placing, by the fifth set including at least one processing module of the plurality of processing modules, results of the left outer join operation in a fifth spool allocated to the fifth set.