A method for performing a join of a first table and a second table is
disclosed. In one instance, each of the plurality of first table rows is
grouped into one of a plurality of first table partitions. It is
determined that a partitioning column of the first table is specified in
an equality condition of the join. One of the plurality of second table
rows is selected, and a partition number is generated for the selected
one of the plurality of second table rows. For a second table row for
which a partition number was generated, a first table partition with a
partition number that matches the generated partition number is
identified, and a product join is used to join the one or more first
table rows in the matching partition with the selected one of the second
table rows.