A method and apparatus for performing recursive database operations is
provided. According to one aspect, a plurality of first-stage slaves and
a plurality of second-stage slaves are established in a database server.
During one or more iterations of a recursive database operation, the
first-stage slaves concurrently process data items stored in a data
repository and send results to the second-stage slaves. The second-stage
slaves receive the results and concurrently process those results. The
second-stage slaves store the results of the second-stage slaves'
processing in the data repository. Subsequent iterations of the recursive
database operation proceed in this manner until the recursive database
operation has been completed. In each iteration, the first-stage slaves
consume the product of the second-stage slaves' previous iteration's
processing, and the second-stage slaves consume the product of the
first-stage slaves' current iteration's processing.