USRE42664EExpiredUtility

Method and apparatus for implementing parallel operations in a database management system

75
Assignee: ORACLE INT CORPPriority: Sep 27, 1993Filed: Jan 5, 2001Granted: Aug 30, 2011
Est. expirySep 27, 2013(expired)· nominal 20-yr term from priority
G06F 9/466Y10S707/99935Y10S707/99932Y10S707/99934Y10S707/99933
75
PatentIndex Score
19
Cited by
80
References
73
Claims

Abstract

The present invention implements parallel processing in a Database Management System. The present invention provides the ability to locate transaction and recovery information at one location and eliminates the need for read locks and two-phased commits. The present invention provides the ability to dynamically partition row sources for parallel processing. Parallelism is based on the ability to parallelize a row source, the partitioning requirements of consecutive row sources and the entire row source tree, and any specification in the SQL statement. A Query Coordinator assumes control of the processing of a entire query and can execute serial row sources. Additional threads of control, Query Server, execute a parallel operators. Parallel operators are called data flow operators (DFOs). A DFO is represented as structured query language (SQL) statements and can be executed concurrently by multiple processes, or query slaves. A central scheduling mechanism, a data flow scheduler, controls a parallelized portion of an execution plan, and can become invisible for serial execution. Table queues are used to partition and transport rows between sets of processes. Node linkages provide the ability to divide the plan into independent lists that can each be executed by a set of query slaves. The present invention maintains a bit vector that is used by a subsequent producer to determine whether any rows need to be produced to its consumers. The present uses states and a count of the slaves that have reached these states to perform its scheduling tasks.

Claims

exact text as granted — not AI-modified
1. A computer-implemented method of implementing database management system (DBMS) operations in parallel, independent of physical storage locations, said computer-implemented method comprising the steps of:
 generating a serial execution plan for operations in said DBMS;   generating a parallelized execution plan for said serial execution plan, said parallelized execution plan including first and second operations, said second operation including one or more slave processes operating on a plurality of data partitions, the quantity of said data partitions being greater than the quantity of said slave processes, each of said slave processes operating on a different one of said data partitions, at least one of said slave processes operating on more than one of said data partitions;   executing said parallelized execution plan when a plurality of parallel resources of said computer system are available, said first and second operations executing in parallel; and   executing said serial execution plan when said plurality of resources are not available.   
     
     
       2. The method of  claim 1  wherein said step of generating a parallelized execution plan includes the steps of:
 identifying one or more segments of said serial execution plan that can be parallelized; and 
 identifying partitioning requirements of said one or more segments. 
 
     
     
       3. The method of  claim 1  wherein said step of generating a parallelized execution plan is based on a specification of parallelism in a statement specifying one of said operations. 
     
     
       4. A method of generating an execution plan to process a database management system (DBMS) operation in parallel including the steps of:
 generating an execution plan for said operation;   examining said execution plan from bottom up;   identifying a parallelized portion of said execution plan, said parallelized portion can be processed in parallel, said parallelized portion including first and second operations, said first and second operations being executable in parallel, said second operation including one or more slave processes operating on a plurality of data partitions, the quantity of said data partitions being greater than the quantity of said slave processes, each of said slave processes operating on a different one of said data partitions, at least one of said slave processes operating on more than one of said data partitions;   identifying some serial portion of said execution plan, said serial portion can be processed in serial;   allocating a central scheduler between said parallelized portion and said serial portion.   
     
     
       5. The method of  claim 4  further including the steps of:
 identifying a first data flow requirement for a first portion of said execution plan said first data flow requirement corresponding to a partitioning of a data flow required by said first portion; 
 identifying a second data flow requirement for a second portion of said execution plan said second data flow requirement corresponding by said second portion; and 
 allocating a data flow director between said first portion and said second portion when said first data flow requirement is not compatible with said second data flow requirement said data flow director repartitioning a data flow of said first portion to be compatible with said second data flow requirement. 
 
     
     
       6. A computer-implemented method of executing database management system (DBMS) operations in parallel in a computer system, said method comprising the steps of:
 generating an execution plan to execute said operations in parallel, said execution plan including first and second operations;   initiating an operation coordinator in said computer system to coordinate execution of said execution plan;   initiating, by said operation coordinator, a first set of slaves operating on a plurality of data partitions to produce data, the quantity of said data partitions being greater than the quantity of said first set of slave processes, each of said slave processes of said first set of slave processes operating on a different one of said data partitions, at least one of said slave processes operating on more than one of said data partitions;   initiating, by said operation coordinator, a second set of slaves to consume data; and   directing said second set of slaves to produce data and said first set of slaves to consume data when said first set of slaves finishes producing data.   
     
     
       7. The method of  claim 6  wherein said execution plan is comprised of operator nodes and said operator nodes are linked together to form execution sets. 
     
     
       8. A computer-implemented method of executing database management system (DBMS) operations in parallel in a computer system, said method comprising the steps of:
 generating an execution plan to execute said operations in parallel, said execution plan including first and second operations;   initiating a data flow scheduler in said computer system to coordinate data flow;   initiating, by said data flow scheduler, producer slaves operating on a plurality of data partitions to produce a first data production the quantity of said data partitions being greater than the quantity of said producer slaves, each of said producer slaves operating on a different one of said data partitions, at least one of said producer slaves operating on more than one of said data partitions;   initiating, by said data flow scheduler, consumer slaves to consume said first data production;   transmitting a ready message to said data flow scheduler when said producer slaves become ready to produce data;   transmitting a completion message to said data flow scheduler when said first data production is completed:   generating, by said data flow scheduler, in response to said completion message, an identification of a plurality of said consumer slaves that did not receive data in said first data production, said generating step using information derived from said ready message;   examining, by said producer slaves, said identification during a subsequent data production; and   reducing said subsequent data production such that said subsequent data production does not produce data for said plurality of said consumer slaves.   
     
     
       9. In a computer system, a database management apparatus for implementing database operations in parallel, independent of physical storage locations, said database management apparatus comprising;
 means for generating a serial execution plan for operations in said database management apparatus;   means for generating a parallelized execution plan for said serial execution plan, said parallelized execution plan including first and second operations, said second operation including one or more slave processes operating on a plurality of data partitions, the quantity of said data partitions being greater than the quantity of said slave processes, each of said slave processes operating on a different one of said data partitions, at least one of said slave processes operating on more than one of said data partitions;   means for executing said parallelized execution plan when a plurality of parallel resources of said computer system are available, said first and second operations executing in parallel; and   means for executing said serial execution plan when said plurality of resources are not available.   
     
     
       10. The apparatus of  claim 9  wherein said means for generating a parallelized execution plan further includes:
 means for identifying one or more segments of said serial execution plan that can be parallelized; and 
 means for identifying partitioning requirements of said one or more segments. 
 
     
     
       11. The apparatus of  claim 9  wherein said means for generating a parallelized execution plan is based on a specification of parallelism in a statement specifying one of said operations. 
     
     
       12. In a computer system, a database management apparatus for generating an execution plan to process database operations in parallel, said database management apparatus comprising;
 means for generating an execution plan for said operations;   means for examining said execution plan from bottom up;   means for identifying a parallelized portion of said execution plan, said parallelized portion including first and second operations, said parallelized portion being processed in parallel, said second operation including one or more slave processes operating on a plurality of data partitions, the quantity of said data partitions being greater than the quantity of said slave processes, each of said slave processes operating on a different one of said data partitions, at least one of said slave processes operating on more than one of said data partitions;   means for identifying some serial portion of said execution plan, said serial portion being processed in serial; and   means for allocating a central scheduler between said parallelized portion and said serial portion.   
     
     
       13. The apparatus of  claim 12  further including:
 means for identifying a first data flow requirement for a first portion of said execution plan said first data flow requirement corresponding to a partitioning of a data flow required by said first portion; 
 means for identifying a second data flow requirement for a second portion of said execution plan said second data flow requirement corresponding to said second portion; and 
 means for allocating a data flow director between said first portion and said second portion when said first data flow requirement is not compatible with said second data flow requirement, said data flow director repartitioning a data flow of said first portion to be compatible with said second data flow requirement. 
 
     
     
       14. In a computer system, a database management apparatus for executing database operations in parallel, said database management apparatus comprising:
 means for generating an execution plan to execute said operations in parallel, said execution plan including first and second operations, said first and second operations being executed in parallel;   means for initiating an operation coordinator in said computer system to coordinate execution of said execution plan;   means for initiating, by said operation coordinator, a first set of slaves operating on a plurality of data partitions to produce data, the quantity of said data partitions being greater than the quantity of said first set of slave processes, each of said slave processes of said first set of slave processes operating on a different one of said data partitions, at least one of said slave processes operating on more than one of said data partitions;   means for initiating, by said operation coordinator, a second set of slaves to consume data; and   means for directing said second set of slaves to produce data and said first set of slaves to consume data when said first set of slaves finishes producing data.   
     
     
       15. The apparatus of  claim 14  wherein said execution plan is further comprised of operator nodes and said operator nodes are linked together to form execution sets. 
     
     
       16. In a computer system, a database management apparatus for executing database operations in parallel, said database management apparatus comprising:
 means for generating an execution plan to execute said operations in parallel, said execution plan including first and second operations, said first and second operations being executed in parallel;   means for initiating a data flow scheduler in said computer system to coordinate data flow;   means for initiating, by said data flow scheduler, producer slaves operating on a plurality of data partitions to produce a first data production, the quantity of said data partitions being greater than the quantity of said producer slaves, each of said producer slaves operating on a different one of said data partitions, at least one of said producer slaves operating on more than one of said data partitions;   means for initiating, by said data flow scheduler, consumer slaves to consume said first data production;   means for transmitting a ready message to said data flow scheduler when said producer slaves become ready to produce data;   means for transmitting a completion message to said data flow scheduler when said first data production is completed;   means for generating, by said data flow scheduler, in response to said completion message, an identification of a plurality of said consumer slaves that did not receive data in said first data production, said generating step using information derived from said ready message;   means for examining, by said producer slaves, said identification during a subsequent data production; and   means for reducing said subsequent data production such that said subsequent data production does not produce data for said plurality of said consumer slaves.   
     
     
       17. An article of manufacture comprising a computer usable mass storage medium having computer readable program code embodied therein for causing a processing means to execute computer-implemented database management operations in parallel, independent of physical storage locations, said computer readable program code in said article of manufacture comprising:
 computer readable program code for causing said processing means to generate a serial execution plan for said database management operations;   computer readable program code for causing said processing means to generate a parallelized execution plan for said serial execution plan, said parallelized execution plan including first and second operations, said second operation including one or more slave processes operating on a plurality of data partitions, the quantity of said data partitions being greater than the quantity of said slave processes, each of said slave processes operating on a different one of said data partitions, at least one of said slave processes operating on more than one of said data partitions;   computer readable program code for causing said processing means to execute said parallelized execution plan when a plurality of parallel resources of said computer system are available, said first and second operations executing in parallel; and   computer readable program code for causing said processing means to execute said serial execution plan when said plurality of resources are not available.   
     
     
       18. The article of manufacture of  claim 17  wherein said computer readable program code for causing said processing means to generate a parallelized execution plan further includes:
 computer readable program code for causing said processing means to identify one or more segments of said serial execution plan that can be parallelized; and 
 computer readable program code for causing said processing means to identify partitioning requirements of said one or more segments. 
 
     
     
       19. The article of manufacture of  claim 17  wherein said computer readable program code for causing said processing means to generate a parallelized execution plan is based on a specification of parallelism in a statement specifying one of said operations. 
     
     
       20. A method of parallelizing an operation, the method comprising the steps of:
 dividing the operation into a set of work partitions;   assigning work partitions from said set of work partitions to a plurality of entities, wherein at least one entity of said plurality of entities is assigned a plurality of work partitions from said set of work partitions;   wherein the step of assigning work partitions is performed by assigning the work partitions in a sequence based at least in part on sizes associated with the work partitions, with relatively larger work partitions assigned before relatively smaller work partitions;   said plurality of entities operating in parallel on work partitions assigned to said plurality of entities to perform said operation; and   wherein assigning the work partitions in a sequence includes assigning a first previously unassigned work partition to a particular entity of the plurality of entities, and when the particular entity completes processing the first work partition, picking a second previously unassigned work partition based at least in part on the size of the second work partition, and assigning the second unassigned work partition to the particular entity for processing,   wherein the method is performed by one or more computing devices.   
     
     
       21. A method of parallelizing an operation, the method comprising the steps of:
 dividing the operation into a set of work partitions;   assigning work partitions from said set of work partitions to a plurality of entities, wherein at least one entity of said plurality of entities is assigned a plurality of work partitions from said set of work partitions, wherein the step of assigning work partitions includes:
 assigning said at least one entity a first work partition from said set of work partitions; and 
   after said at least one entity has completed operating on said first work partition, assigning said at least one entity a second work partition from said set of work partitions, wherein the step of assigning said at least one entity a second work partition includes
 determining whether there are any unassigned work partitions from a first level in a hierarchy to which said first work partition belonged; and 
 if there are no unassigned work partitions from the first level in the hierarchy, then selecting said second work partition from a level in said hierarchy that is two levels above said first level in said hierarchy; 
   said plurality of entities operating in parallel on work partitions assigned to said plurality of entities to perform said operation; and   wherein the operation is specified in a query that corresponds to the hierarchy of operations,   wherein the method is performed by one or more computing devices.   
     
     
       22. A method of parallelizing an operation, the method comprising the steps of:
 dividing the operation into a set of work partitions;   assigning work partitions from said set of work partitions to a plurality of entities, wherein at least one entity of said plurality of entities is assigned a plurality of work partitions from said set of work partitions;   said plurality of entities operating in parallel on work partitions assigned to said plurality of entities to perform said operation;   the method includes the step of generating a serial execution plan for operations in a database management system (DBMS) running on a computer system;   the method includes the step of generating a parallelized execution plan for said serial execution plan, said parallelized execution plan including first and second operations;   the step of dividing an operation is performed by dividing said second operation;   the plurality of entities includes one or more slave processes operating on a plurality of data partitions, the quantity of said data partitions being greater than the quantity of said slave processes;   executing said parallelized execution plan when a plurality of parallel resources of said computer system are available; and   executing said serial execution plan when said plurality of resources are not available,   wherein the method is performed by one or more computing devices.   
     
     
       23. The method of claim 22 wherein said step of generating a parallelized execution plan includes the steps of:
 identifying one or more segments of said serial execution plan that can be parallelized; and   identifying partitioning requirements of said one or more segments.   
     
     
       24. The method of claim 22 wherein said step of generating a parallelized execution plan is based on a specification of parallelism in a statement specifying one of said operations. 
     
     
       25. A method of parallelizing an operation, the method comprising the steps of:
 dividing the operation into a set of work partitions;   assigning work partitions from said set of work partitions to a plurality of entities, wherein at least one entity of said plurality of entities is assigned a plurality of work partitions from said set of work partitions;   said plurality of entities operating in parallel on work partitions assigned to said plurality of entities to perform said operation;   generating an execution plan for said operation;   examining said execution plan from bottom up;   identifying a parallelized portion of said execution plan, said parallelized portion can be processed in parallel, said parallelized portion including first and second operations, said first and second operations being executable in parallel;   wherein the step of dividing the operation is performed by dividing said second operation;   wherein the plurality of entities includes one or more slave processes operating on a plurality of data partitions, the quantity of said data partitions being greater than the quantity of said slave processes;   identifying some serial portion of said execution plan, said serial portion can be processed in serial; and   allocating a central scheduler between said parallelized portion and said serial portion,   wherein the method is performed by one or more computing devices.   
     
     
       26. The method of claim 25 further including the steps of:
 identifying a first data flow requirement for a first portion of said execution plan said first data flow requirement corresponding to a partitioning of a data flow required by said first portion;   identifying a second data flow requirement for a second portion of said execution plan said second data flow requirement corresponding by said second portion; and   allocating a data flow director between said first portion and said second portion when said first data flow requirement is not compatible with said second data flow requirement said data flow director repartitioning a data flow of said first portion to be compatible with said second data flow requirement.   
     
     
       27. A method for parallelizing an operation, the method comprising the steps of:
 dividing the operation into a set of work partitions;   assigning work partitions from said set of work partitions to a plurality of entities, wherein at least one entity of said plurality of entities is assigned a plurality of work partitions from said set of work partitions;   said plurality of entities operating in parallel on work partitions assigned to said plurality of entities to perform said operation;   generating an execution plan to execute database management system (DBMS) operations in parallel, said execution plan including first and second operations;   wherein the step of dividing said operation is performed by dividing said second operation;   initiating an operation coordinator in a computer system to coordinate execution of said execution plan;   initiating, by said operation coordinator, a first set of slaves operating on a plurality of data partitions to produce data, the quantity of said data partitions being greater than the quantity of said first set of slave processes;   initiating, as said plurality of entities, by said operation coordinator, a second set of slaves to consume data; and   directing said second set of slaves to produce data and said first set of slaves to consume data when said first set of slaves finishes producing data,   wherein the method is performed by one or more computing devices.   
     
     
       28. The method of claim 27 wherein said execution plan is comprised of operator nodes and said operator nodes are linked together to form execution sets. 
     
     
       29. A method for parallelizing an operation, the method comprising the steps of:
 dividing the operation into a set of work partitions;   assigning work partitions from said set of work partitions to a plurality of entities, wherein at least one entity of said plurality of entities is assigned a plurality of work partitions from said set of work partitions;   said plurality of entities operating in parallel on work partitions assigned to said plurality of entities to perform said operation;   generating an execution plan to execute said operations in parallel, said execution plan including first and second operations;   wherein the step of dividing said operation includes dividing said first operation;   initiating producer slaves operating on a plurality of data partitions to produce a first data production;   initiating consumer slaves to consume said first data production;   when said first data production is completed, generating an identification of a plurality of said consumer slaves that did not receive data in said first data production;   examining said identification during a subsequent data production; and   reducing said subsequent data production such that said subsequent data production does not produce data for said plurality of said consumer slaves,   wherein the method is performed by one or more computing devices.   
     
     
       30. A method for processing a statement in a database system, the method comprising the steps of:
 receiving, at a database server, a statement that specifies at least a database operation that operates on data within a database;   determining, at said database server, a user-specified degree of parallelism to use in performing the database operation, wherein said user-specified degree of parallelism expressly indicates a specific number of entities to use in parallel to perform said database operation;   dividing, at said database server, the database operation into a set of work partitions;   performing, at said database server, a determination of how many entities to use to perform said operation based, at least in part, on the user-specified degree of parallelism, wherein the amount of entities that are chosen to use to perform on the database operation is different than the amount of entities that would have been chosen if no user-specified degree of parallelism had been specified;   assigning, at said database server, work partitions from said set of work partitions to a plurality of entities based on said determination; and   said plurality of entities operating in parallel on work partitions assigned to said plurality of entities to perform said database operation,   wherein the method is performed by one or more computing devices.   
     
     
       31. The method of claim 30 wherein:
 the statement requires a plurality of operations;   the user-specified degree of parallelism is specified in said statement, and   the statement specifies said degree of parallelism for a subset of the plurality of operations required by the statement.   
     
     
       32. The method of claim 30 wherein
 the user-specified degree of parallelism is specified in said statement; and   the degree of parallelism specified by the statement indicates that no amount of parallelism is to be used during execution of a particular portion of the statement.   
     
     
       33. The method of claim 30 wherein
 the user-specified degree of parallelism is specified in said statement, and   the degree of parallelism specified by the statement indicates a maximum amount of parallelism to use during execution of said operation.   
     
     
       34. A method of processing a query in a database system, the method comprising the steps of:
 dividing, at a database server, a database operation required by said query into a set of work partitions by generating a set of query fragments, each work partition of said set of work partitions to be performed serially by a single entity to which said work partition is assigned;   incorporating hints into at least some of said query fragments at said database server, wherein said query fragments incorporating hints comprise work partitions that may be performed in a plurality of ways to reach a same result, and wherein said hint associated with a given query fragment indicates one way of said plurality of ways to perform said work partition;   assigning, at said database server, query fragments from said set of query fragments to a plurality of entities; and   said plurality of entities operating in parallel on query fragments assigned to said plurality of entities to perform said database operation, wherein entities working on a query fragment associated with a hint perform the work partition associated with said query fragment in said one way dictated by said hint,   wherein the method is performed by one or more computing devices.   
     
     
       35. The method of claim 34 wherein the step of incorporating hints includes incorporating hints that dictate the operation of a table scan. 
     
     
       36. The method of claim 35 wherein the step of incorporating hints that dictate the operation of a table scan includes incorporating hints that rowid partitioning is to be used during the table scan. 
     
     
       37. The method of claim 34 wherein the step of incorporating hints includes incorporating hints that specify performance of a full table scan. 
     
     
       38. The method of claim 34 wherein the step of incorporating hints includes incorporating hints that specify using a particular type of join. 
     
     
       39. The method of claim 38 wherein the step of incorporating hints that specify using a particular type of join includes incorporating hints that specify using a sort/merge join. 
     
     
       40. The method of claim 38 wherein the step of incorporating hints that specify using a particular type of join includes incorporating hints that specify using a nested loop join. 
     
     
       41. A method of processing a query, the method comprising the steps of:
 determining a hierarchy of operations associated with a query;   dividing a first operation required by said query into a first set of work partitions;   dividing a second operation required by said query into a second set of work partitions, wherein said second operation immediately follows said first operation in said hierarchy;   dividing a third operation required by said query into a third set of work partitions, wherein said third operation immediately follows said second operation in said hierarchy;   assigning work partitions from said first set of work partitions to a first plurality of entities;   said first plurality of entities operating in parallel on work partitions assigned to said first plurality of entities from said first set of work partitions to perform said first operation;   assigning work partitions from said second set of work partitions to a second plurality of entities, wherein said second plurality of entities are different entities than said first plurality of entities; and   said second plurality of entities operating in parallel on work partitions assigned to said second plurality of entities from said second set of work partitions to perform said second operation;   assigning work partitions from said third set of work partitions to said first plurality of entities; and   said first plurality of entities operating in parallel on work partitions assigned to said first plurality of entities from said third set of work partitions to perform said third operation,   wherein the method is performed by one or more computing devices.   
     
     
       42. The method of claim 41 further comprising performing the following steps when a given entity in said first set of entities finishes performing a work partition from said first set of work partitions:
 determining whether there are any unassigned work partitions from said first set of work partitions; and   if there are no unassigned work partitions from said first set of work partitions, then assigning the given entity a work partition selected from said third set of work partitions; and   if there are unassigned work partitions from said first set of work partitions, then assigning the given entity a work partition selected from said first set of work partitions.   
     
     
       43. The method of claim 41 wherein the hierarchy includes odd levels and even levels, and the method further comprises the steps of assigning work partitions from odd levels to said first plurality of entities and work partitions from even levels to said second plurality of entities. 
     
     
       44. The method of claim 41 wherein performing work partitions in said first set of work partitions causes said first set of entities produce output consumed by said second plurality of entities, and performing work partitions in said third set of work partitions causes said first set of entities to consume output produced by said second plurality of entities. 
     
     
       45. A computer-readable storage medium carrying instructions for parallelizing an operation, the instructions including instructions for performing the steps of:
 dividing the operation into a set of work partitions;   assigning work partitions from said set of work partitions to a plurality of entities, wherein at least one entity of said plurality of entities is assigned a plurality of work partitions from said set of work partitions;   wherein the step of assigning work partitions is performed by assigning the work partitions in a sequence based at least in part on sizes associated, with the work partitions with relatively larger work partitions assigned before relatively smaller work partitions;   said plurality of entities operating in parallel on work partitions assigned to said plurality of entities to perform said operation; and   wherein assigning the work partitions in a sequence includes assigning a first previously unassigned work partition to a particular entity of the plurality of entities, and when the particular entity completes processing the first work partition, picking a second previously unassigned work partition based at least in part to the size of the second work partition, and assigning the second unassigned work partition to the particular entity for processing.   
     
     
       46. A computer-readable storage medium carrying instructions for parallelizing an operation, the instructions including instructions for performing the steps of:
 dividing the operation into a set of work partitions;   assigning work partitions from said set of work partitions to a plurality of entities, wherein at least one entity of said plurality of entities is assigned a plurality of work partitions from said set of work partitions, wherein the step of assigning work partitions includes   assigning said at least one entity a first work partition from said set of work partitions; and   after said at least one entity has completed operating on said first work partition, assigning said at least one entity a second work partition from said set of work partitions;   said plurality of entities operating in parallel on work partitions assigned to said plurality of entities to perform said operation;   wherein the operation is specified in a query that corresponds to a hierarchy of operations; and   the step of assigning said at least one entity a second work partition includes
 determining whether there are any unassigned work partitions from a first level in the hierarchy to which said first work partition belonged; and 
 if there are no unassigned work partitions from the first level in the hierarchy, then selecting said second work partition from a level in said hierarchy that is two levels above said first level in said hierarchy. 
   
     
     
       47. A computer-readable storage medium carrying instructions for parallelizing an operation, the instructions including instructions for performing the steps of:
 dividing the operation into a set of work partitions;   assigning work partitions from said set of work partitions to a plurality of entities, wherein at least one entity of said plurality of entities is assigned a plurality of work partitions from said set of work partitions;   said plurality of entities operation in parallel on work partitions assigned to said plurality of entities to perform said operation;   wherein the instructions include instructions for performing the step of generating a serial execution plan for operations in a database management system (DBMS) running on a computer system;   wherein the instructions include instructions for performing the step of generating a parallelized execution plan for said serial execution plan, said parallelized execution plan including first and second operations;   wherein the step of dividing an operation is performed by dividing said second operation;   wherein the plurality of entities includes one or more slave processes operating on a plurality of data partitions, the quantity of said data partitions being greater than the quantity of said slave processes;   wherein the instructions include instructions for performing the step of executing said parallelized execution plan when a plurality of parallel resources of said computer system are available; and   wherein the instructions include instructions for performing the step of executing said serial execution plan when said plurality of resources are not available.   
     
     
       48. The computer-readable storage medium of claim 47 wherein said step of generating a parallelized execution plan includes the steps of:
 identifying one or more segments of said serial execution plan that can be parallelized; and   identifying partitioning requirements of said one or more segments.   
     
     
       49. The computer-readable storage medium of claim 47 wherein said step of generating a parallelized execution plan is based on a specification of parallelism in a statement specifying one of said operations. 
     
     
       50. A computer-readable storage medium carrying instructions for parallelizing an operation, the instructions including instructions for performing the steps of:
 dividing the operation into a set of work partitions;   assigning work partitions from said set of work partitions to a plurality of entities, wherein at least one entity of said plurality of entities is assigned a plurality of work partitions from said set of work partitions;   said plurality of entities operating in parallel on work partitions assigned to said plurality of entities to perform some operation;   generating an execution plan for said operation;   examining said execution plan from bottom up;   identifying a parallelized portion of said execution plan, said parallelized portion can be processed in parallel, said parallelized portion including first and second operations, said first and second operations being executable in parallel;   wherein the step of dividing the operation is performed by dividing said second operation;   wherein the plurality of entities includes one or more slave processes operating on a plurality of data partitions, the quantity of said data partitions being greater than the quantity of said slave processes;   identifying some serial portion of said execution plan, said serial portion can be processed in serial; and   allocating a central scheduler between said parallelized portion and said serial portion.   
     
     
       51. The computer-readable storage medium of claim 50 further including instructions for performing the steps of:
 identifying a first data flow requirement for a first portion of said execution plan said first data flow requirement corresponding to a partitioning of a data flow required by said first portion;   identifying a second data flow requirement for a second portion of said execution plan said second data flow requirement corresponding by said second portion; and   allocating a data flow director between said first portion and said second portion when said first data flow requirement is not compatible with said second data flow requirement said data flow director repartitioning a data flow of said first portion to be compatible with said second data flow requirement.   
     
     
       52. A computer-readable storage medium carrying instructions for parallelizing an operation, the instructions including instructions for performing the steps of:
 dividing the operation into a set of work partitions;   assigning work partitions from said set of work partitions to a plurality of entities, wherein at least one entity of said plurality of entities is assigned a plurality of work partitions from said set of work partitions;   said plurality of entities operating in parallel on work partitions assigned to said plurality of entities to perform said operation;   generating an execution plan to execute database management system (DBMS) operations in parallel, said execution plan including first and second operations;   wherein the step of dividing said operation is performed by dividing said second operation;   initiating an operation coordinator in a computer system to coordinate execution of said execution plan;   initiating, by said operation coordinator, a first set of slaves operating on a plurality of data partitions to produce data, the quantity of said data partitions being greater than the quantity of said first set of slave processes;   initiating, as said plurality of entities, by said operation coordinator, a second set of slaves to consume data; and   directing said second set of slaves to produce data and said first set of slaves to consume data when said first set of slaves finishes producing data.   
     
     
       53. The computer-readable storage medium of claim 52 wherein said execution plan is comprised of operator nodes and said operator nodes are linked together to form execution sets. 
     
     
       54. A computer-readable storage medium carrying instructions for parallelizing an operation, the instructions including instructions for performing the steps of:
 dividing the operation into a set of work partitions;   assigning work partitions from said set of work partitions to a plurality of entities, wherein at least one entity of said plurality of entities is assigned a plurality of work partitions from said set of work partitions;   said plurality of entities operating in parallel on work partitions assigned to said plurality of entities to perform said operation;   generating an execution plan to execute said operations in parallel, said execution plan including first and second operations;   wherein the step of dividing said operation includes dividing said first operation;   initiating producer slaves operating on a plurality of data partitions to produce a first data production;   initiating consumer slaves to consume said first data production;   when said first data production is completed, generating an identification of a plurality of said consumer slaves that did not receive data in said first data production;   examining said identification during a subsequent data production; and   reducing said subsequent data production such that said subsequent data production does not produce data for said plurality of said consumer slaves.   
     
     
       55. A computer-readable storage medium storing instructions for processing a statement in a database system, the instructions including instructions for performing the steps of:
 receiving, at a database server, a statement that specifies at least a database operation that operates on data within a database;   determining, at said database server, a user-specified degree of parallelism to use in performing the database operation, wherein said user-specified degree of parallelism expressly indicates a specific number of entities to use in parallel to perform said database operation;   dividing, at said database server, the database operation into a set of work partitions;   performing, at said database server, a determination of how many entities to use to perform said operation based, at least in part, on the user-specified degree of parallelism, wherein the amount of entities that are chosen to use to perform on the database operation is different than the amount of entities that would have been chosen if no user-specified degree of parallelism had been specified;   assigning, at said database server, work partitions from said set of work partitions to a plurality of entities based on said determination; and   said plurality of entities operating in parallel on work partitions assigned to said plurality of entities to perform said database operation,   wherein the method is performed by one or more computing devices.   
     
     
       56. The computer-readable storage medium of claim 55 wherein:
 the statement requires a plurality of operations;   the user-specified degree of parallelism is specified in said statement, and   the statement specifies said degree of parallelism for a subset of the plurality of operations required by the statement.   
     
     
       57. The computer-readable storage medium of claim 55 wherein
 the user-specified degree of parallelism is specified in said statement; and   the degree of parallelism specified by the statement indicates that no amount of parallelism is to be used during execution of a particular portion of the statement.   
     
     
       58. The computer-readable storage medium of claim 55 wherein
 the user-specified degree of parallelism is specified in said statement, and   the degree of parallelism specified by the statement indicates a maximum amount of parallelism to use during execution of said operation.   
     
     
       59. A computer-readable storage medium carrying instructions for processing a query in a database system, the instructions including instructions for performing the steps of:
 dividing, at a database server, a database operation required by said query into a set of work partitions by generating a set of query fragments, each work partition of said set of work partitions to be performed serially by a single entity to which said work partition is assigned;   incorporating hints into at least some of said query fragments at said database server, wherein said query fragments incorporating hints comprise work partitions that may be performed in a plurality of ways to reach a same result, and wherein said hint associated with a given query fragment indicates one way of said plurality of ways to perform said work partition;   assigning, at said database server, query fragments from said set of query fragments to a plurality of entities; and   said plurality of entities operating in parallel on query fragments assigned to said plurality of entities to perform said database operation, wherein entities working on a query fragment associated with a hint perform the work partition associated with said query fragment in said one way dictated by said hint,   wherein the method is performed by one or more computing devices.   
     
     
       60. The computer-readable storage medium of claim 59 wherein the step of incorporating hints includes incorporating hints that dictate the operation of a table scan. 
     
     
       61. The computer-readable storage medium of claim 60 wherein the step of incorporating hints that dictate the operation of a table scan includes incorporating hints that rowid partitioning is to be used during the table scan. 
     
     
       62. The computer-readable storage medium of claim 59 wherein the step of incorporating hints includes incorporating hints that specify performance of a full table scan. 
     
     
       63. The computer-readable storage medium of claim 59 wherein the step of incorporating hints includes incorporating hints that specify using a particular type of join. 
     
     
       64. The computer-readable storage medium of claim 63 wherein the step of incorporating hints that specify using a particular type of join includes incorporating hints that specify using a sort/merge join. 
     
     
       65. The computer-readable storage medium of claim 63 wherein the step of incorporating hints that specify using a particular type of join includes incorporating hints that specify using a nested loop join. 
     
     
       66. A computer-readable storage medium carrying instructions for processing a query, the instructions including instructions for performing the steps of:
 determining a hierarchy of operations associated with a query;   dividing a first operation required by said query into a first set of work partitions;   dividing a second operation required by said query into a second set of work partitions, wherein said second operation immediately follows said first operation in said hierarchy;   dividing a third operation required by said query into a third set of work partitions, wherein said third operation immediately follows said second operation in said hierarchy;   assigning work partitions from said first set of work partitions to a first plurality of entities;   said first plurality of entities operating in parallel on work partitions assigned to said first plurality of entities from said first set of work partitions to perform said first operation;   assigning work partitions from said second set of work partitions to a second plurality of entities, wherein said second plurality of entities are different entities than said first plurality of entities; and   said second plurality of entities operating in parallel on work partitions assigned to said second plurality of entities from said second set of work partitions to perform said second operation;   assigning work partitions from said third set of work partitions to said first plurality of entities; and   said first plurality of entities operating in parallel on work partitions assigned to said first plurality of entities from said third set of work partitions to perform said third operation.   
     
     
       67. The computer-readable storage medium of claim 66 further comprising instructions for performing the following steps when a given entity in said first set of entities finishes performing a work partition from said first set of work partitions:
 determining whether there are any unassigned work partitions from said first set of work partitions; and   if there are no unassigned work partitions from said first set of work partitions, then assigning the given entity a work partition selected from said third set of work partitions; and   if there are unassigned work partitions from said first set of work partitions, then assigning the given entity a work partition selected from said first set of work partitions.   
     
     
       68. The computer-readable storage medium of claim 66 wherein the hierarchy includes odd levels and even levels, and the instructions further include instructions for performing the steps of assigning work partitions from odd levels to said first plurality of entities and work partitions from even levels to said second plurality of entities. 
     
     
       69. The computer-readable storage medium of claim 66 wherein performing work partitions in said first set of work partitions causes said first set of entities produce output consumed by said second plurality of entities, and performing work partitions in said third set of work partitions causes said first set of entities to consume output produced by said second plurality of entities. 
     
     
       70. The method of claim 30, wherein the user-specified degree of parallelism is specified in said statement. 
     
     
       71. The method of claim 30, wherein the user-specified degree of parallelism is specified for operations that involve a particular table. 
     
     
       72. The computer-readable storage medium of claim 55, wherein the user-specified degree of parallelism is specified in said statement. 
     
     
       73. The computer-readable storage medium of claim 55, wherein the user-specified degree of parallelism is specified for operations that involve a particular table.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.