Executing a parallel single cursor model
First Claim
Patent Images
1. A method for processing a database statement, the method comprising the steps of:
- receiving the database statement at a database server;
determining that at least one operation required by the database statement can be parallelized;
within the database server, a query coordinator generating a first execution plan that specifies how to execute all operations required by the database statement;
sending the database statement to a remote slave, wherein the database statement sent to the remote slave is the same entire database statement that was received by the database server;
causing the remote slave to generate a second execution plan that specifies how to execute all operations required by the database statement, wherein the database statement for which the remote slave generates the second execution plan is the same entire database statement that was received by the database server;
causing the remote slave to execute logic contained within the second execution plan, wherein the logic dictates a sequence of interactions between the query coordinator and the remote slave;
wherein the steps of the method are performed by one or more computing devices.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques are provided for executing database statements, or portions thereof, in parallel without using slave SQL to communicate to each slave the operations to be performed by the slave. Techniques are provided for incorporating within a shared cursor the code fragments that govern both sides of the interaction between a query coordinator (QC) and remotely-located slaves. Further, techniques are provided for the QC to communicate with each slave on how and which portions of the execution plan to execute and when. A state-transition engine for slave execution under the control of the query-coordinator is also provided.
-
Citations
24 Claims
-
1. A method for processing a database statement, the method comprising the steps of:
-
receiving the database statement at a database server; determining that at least one operation required by the database statement can be parallelized; within the database server, a query coordinator generating a first execution plan that specifies how to execute all operations required by the database statement; sending the database statement to a remote slave, wherein the database statement sent to the remote slave is the same entire database statement that was received by the database server; causing the remote slave to generate a second execution plan that specifies how to execute all operations required by the database statement, wherein the database statement for which the remote slave generates the second execution plan is the same entire database statement that was received by the database server; causing the remote slave to execute logic contained within the second execution plan, wherein the logic dictates a sequence of interactions between the query coordinator and the remote slave; wherein the steps of the method are performed by one or more computing devices. - View Dependent Claims (2, 3, 4, 5, 6, 14, 15, 16, 17, 18)
-
-
7. A method for processing a database statement, the method comprising the steps of:
-
receiving the database statement at a database server; determining that at least one operation required by the database statement can be parallelized; within the database server, a query coordinator generating a first execution plan that specifies how to execute all operations required by the database statement; sending the database statement to a remote slave, wherein the database statement sent to the remote slave is the same entire database statement that was received by the database server; causing the remote slave to generate a second execution plan that specifies how to execute all operations required by the database statement, wherein the database statement for which the remote slave generates the second execution plan is the same entire database statement that was received by the database server; causing the query coordinator to execute logic contained within the first execution plan, wherein the logic dictates a sequence of interactions between the query coordinator and the remote slave; wherein the steps of the method are performed by one or more computing devices. - View Dependent Claims (8, 9)
-
-
10. A method for processing a database statement, the method comprising the steps of:
-
receiving the database statement at a database server; generating an execution plan for the database statement, wherein the execution plan specifies a first operation that produces data and a second operation that consumes data produced by the first operation; sending the database statement to one or more remote nodes where a first plurality of slave processes reside, wherein the database statement sent to the one or more remote nodes is the same entire database statement that was received by the database server; generating, from the database statement, at each of the one or more remote nodes, a second execution plan, wherein the database statement from which the second execution plan is generated at each of the one or more remote nodes is the same entire database statement that was received by the database server; assigning producing slaves, of the first plurality of slave processes, to perform the first operation; assigning consuming slaves, of the first plurality of slave processes, to perform the second operation; sending, to all producing slaves, a first message that indicates which portion of the second execution plan the producing slaves are to execute; receiving, from each producing slave, a second message that indicates that the producing slave is ready to execute; in response to receiving the second message from each producing slave, sending a third message to all consuming slaves that indicates which portion of the second execution plan the consuming slaves are to execute; receiving a fourth message, from each consuming slave, indicating that the consuming slave has begun to execute; and in response to receiving the fourth message from each consuming slave, sending a fifth message to each producing slave to resume execution; wherein the steps of the method are performed by one or more computing devices. - View Dependent Claims (11, 12)
-
-
13. A computer-readable storage medium storing one or more sequences of instructions for processing a database statement which instructions, when executed by one or more processors, cause the one or more processors to perform steps comprising:
-
receiving the database statement at a database server; determining that at least one operation required by the database statement can be parallelized; within the database server, a query coordinator generating a first execution plan that specifies how to execute all operations required by the database statement; sending the database statement to a remote slave, wherein the database statement sent to the remote slave is the same entire database statement that was received by the database server; causing the remote slave to generate a second execution plan that specifies how to execute all operations required by the database statement, wherein the database statement for which the remote slave generates the second execution plan is the same entire database statement that was received by the database server; and causing the remote slave to execute logic contained within the second execution plan, wherein the logic dictates a sequence of interactions between the query coordinator and the remote slave.
-
-
19. A computer-readable storage medium storing one or more sequences of instructions for processing a database statement which instructions, when executed by one or more processors, cause the one or more processors to perform steps comprising:
-
receiving the database statement at a database server; determining that at least one operation required by the database statement can be parallelized; within the database server, a query coordinator generating a first execution plan that specifies how to execute all operations required by the database statement; sending the database statement to a remote slave, wherein the database statement sent to the remote slave is the same entire database statement that was received by the database server; causing the remote slave to generate a second execution plan that specifies how to execute all operations required by the database statement, wherein the database statement for which the remote slave generates the second execution plan is the same entire database statement that was received by the database server; and causing the query coordinator to execute logic contained within the first execution plan, wherein the logic dictates a sequence of interactions between the query coordinator and the remote slave. - View Dependent Claims (20, 21)
-
-
22. A computer-readable storage medium storing one or more sequences of instructions for processing a database statement which instructions, when executed by first one or more processors, cause the first one or more processors to perform steps comprising:
-
receiving the database statement at a database server; generating an execution plan for the database statement, wherein the execution plan specifies a first operation that produces data and a second operation that consumes data produced by the first operation; sending the database statement to one or more remote nodes where a first plurality of slave processes reside, wherein the database statement sent to the one or more remote nodes is the same entire database statement that was received by the database server; generating, from the database statement, at each of the one or more remote nodes, a second execution plan, wherein the database statement from which the second execution plan is generated at each of the one or more remote nodes is the same entire database statement that was received by the database server; assigning producing slaves, of the first plurality of slave processes, to perform the first operation; assigning consuming slaves, of the first plurality of slave processes, to perform the second operation; sending, to all producing slaves, a first message that indicates which portion of the second execution plan the producing slaves are to execute; receiving, from each producing slave, a second message that indicates that the producing slave is ready to execute; in response to receiving the second message from each producing slave, sending a third message to all consuming slaves that indicates which portion of the second execution plan the consuming slaves are to execute; receiving a fourth message, from each consuming slave, indicating that the consuming slave has begun to execute; and in response to receiving the fourth message from each consuming slave, sending a fifth message to each producing slave to resume execution. - View Dependent Claims (23, 24)
-
Specification