Parallel execution of queries with a recursive clause
First Claim
1. A method comprising:
- executing a query with a recursive clause wherein the executing includes;
generating a temporary table for a first set of results, wherein the temporary table comprises a plurality of segments, each segment of said plurality of segments being associated with a respective process of a plurality of processes that execute database operations in parallel;
indicating the first set of results are associated with a first iteration of the recursive clause; and
for one or more additional iterations, each corresponding process of the plurality of processes performing in parallel with one or more other processes of the plurality processes;
retrieving, from the temporary table, a set of results from a previous iteration based on an indication that associates the set of results with the previous iteration;
performing one or more operations on the set of results from the previous iteration thereby generating a respective additional set of results;
indicating the respective additional set of results is associated with a respective additional iteration;
appending the respective additional set of results to a corresponding segment associated with said each corresponding process; and
wherein said each corresponding process produced the respective additional set of results by performing, in parallel with the one or more other processes of the plurality processes, the one or more operations.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques are described herein for executing queries with a recursive clause using a plurality of processes that execute database operations in parallel. Each process of the plurality of processes either generate or are assigned a segment that is part of a temporary table. For each iteration of the recursive query, work granules are divided up and assigned to each of the plurality of processes. As each respective process produces a portion of a result set for a given iteration, that process appends said portion of the result set to the respective segment that the respective process manages. Each slave process then publishes, to one or more sources, a reference to the newly generated results. During the next iteration, any slave process may access any of the data from the previous iteration.
-
Citations
22 Claims
-
1. A method comprising:
-
executing a query with a recursive clause wherein the executing includes; generating a temporary table for a first set of results, wherein the temporary table comprises a plurality of segments, each segment of said plurality of segments being associated with a respective process of a plurality of processes that execute database operations in parallel; indicating the first set of results are associated with a first iteration of the recursive clause; and for one or more additional iterations, each corresponding process of the plurality of processes performing in parallel with one or more other processes of the plurality processes; retrieving, from the temporary table, a set of results from a previous iteration based on an indication that associates the set of results with the previous iteration; performing one or more operations on the set of results from the previous iteration thereby generating a respective additional set of results; indicating the respective additional set of results is associated with a respective additional iteration; appending the respective additional set of results to a corresponding segment associated with said each corresponding process; and wherein said each corresponding process produced the respective additional set of results by performing, in parallel with the one or more other processes of the plurality processes, the one or more operations. - View Dependent Claims (2, 3, 4, 5, 6, 7, 21)
-
-
8. One or more non-transitory computer-readable media storing one or more sequences of instructions which, when executed by one or more processors, cause performing of:
-
executing a query with a recursive clause wherein the executing includes; generating a temporary table for a first set of results, wherein the temporary table comprises a plurality of segments, each segment of said plurality of segments being associated with a respective process of a plurality of processes that execute database operations in parallel; indicating the first set of results are associated with a first iteration of the recursive clause; and for one or more additional iterations, each corresponding process of the plurality of processes performing in parallel with one or more other processes of the plurality processes; retrieving, from the temporary table, a set of results from a previous iteration based on an indication that associates the set of results with the previous iteration; performing one or more operations on the set of results from the previous iteration thereby generating a respective additional set of results; indicating the respective additional set of results is associated with a respective additional iteration; appending the respective additional set of results to a corresponding segment associated with said each corresponding process; and wherein said each corresponding process produced the respective additional set of results by performing, in parallel with the one or more other processes of the plurality processes, the one or more operations. - View Dependent Claims (9, 10, 11, 12, 13, 14, 22)
-
-
15. A database management system comprising one or more computing devices configured to:
-
executing a query with a recursive clause wherein the executing includes; generate a temporary table for a first set of results, wherein the temporary table comprises a plurality of segments, each segment of said plurality of segments being associated with a respective process of a plurality of processes that execute database operations in parallel; indicate the first set of results are associated with a first iteration of the recursive clause; and for one or more additional iterations, each corresponding process of the plurality of processes perform in parallel with one or more other processes of the plurality processes; retrieving, from the temporary table, a set of results from a previous iteration based on an indication that associates the set of results with the previous iteration; performing one or more operations on the set of results from the previous iteration thereby generating a respective additional set of results; indicating the respective additional set of results is associated with a respective additional iteration; appending the respective additional set of results to a corresponding segment associated with said each corresponding process; and wherein said each corresponding process produced the respective additional set of results by performing, in parallel with the one or more other processes of the plurality processes, the one or more operations. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification