Patent ID: 8099409

Claim:
A method of performing a join operation in a parallel processing system, comprising: distributing a respective set of rows of a first table and a second table involved in a join operation to each of a plurality of processing modules, wherein the join operation comprises a join on a first column of the first table and a second column of the second table; redistributing, by each of the plurality of processing modules, at least a portion of the rows of the first table distributed thereto substantially equally among the other processing modules; duplicating, by each of the plurality of processing modules, at least a portion of the rows of the second table distributed thereto among the plurality of processing modules; dividing, by each of the plurality of processing modules, rows of the first table distributed thereto into a first subset and a second subset; dividing, by each of the plurality of processing modules, rows of the second table distributed thereto into a third subset and a fourth subset; redistributing, by each of the plurality of processing modules, the rows of the first subset substantially equally among the other processing modules; redistributing, by each of the plurality of processing modules, the rows of the third subset substantially equally among the other processing modules; duplicating, by each of the plurality of processing modules, the rows of the second subset distributed thereto among each of the plurality of processing modules; duplicating, by each of the plurality of processing modules, the rows of the fourth subset distributed thereto substantially equally among each of the plurality of processing modules; placing, by each of the plurality of processing modules, redistributed rows of the first subset received by the processing module into a respective first spool; placing, by each of the plurality of processing modules, duplicated rows of the second subset received by the processing module into a respective second spool; placing, by each of the plurality of processing modules, redistributed rows of the third subset received by the processing module into a respective third spool; placing, by each of the plurality of processing modules, duplicated rows of the fourth subset received by the processing module into a respective fourth spool; joining, by each of the plurality of processing modules, rows of the respective first spool with rows of the respective fourth spool; joining, by each of the plurality of processing modules, rows of the respective second spool with rows of the respective third spool; joining, by one of the plurality of processing modules, rows of the respective second spool with rows of the respective fourth spool; and removing, by each of the plurality of processing modules, rows of the respective second spool and rows of the respective fourth spool.