Parallelizing Query Optimization
First Claim
1. A computer-implemented method for generating an access plan, comprising:
- providing a plurality of subsets of a query, each subset including a plurality of partitions;
enumerating, using at least one thread, each partition of each subset;
generating, using at least one thread, at least one physical access plan for each enumerated partition in parallel, wherein a number of threads that perform the enumerating and the generating is dynamically adapted according to a pool of threads available during the enumerating and the generating and a complexity of the query; and
determining the access plan for the query from the at least one generated physical access plan.
1 Assignment
0 Petitions
Accused Products
Abstract
A system, computer-implemented method, and computer-program product embodiments for generating an access plan. A query optimizer includes an enumeration method which enumerates a plurality of subsets of a query. Each subset in the query has a plurality of partitions. The partitions of each subset are enumerated into enumerated partitions using at least one thread. For each partition, physical access plans are generated, using at least one thread. Physical access plans are generated in parallel with other physical access plans of different partitions and with other enumerating partitions. The number of threads that perform the enumeration and the generation is dynamically adapted according to a pool of threads available during the enumeration of the partitions and the generation of physical access plans, and a complexity of the query. From the generated physical access plans, a final access plan for the query is determined by choosing the most efficient access plan.
32 Citations
20 Claims
-
1. A computer-implemented method for generating an access plan, comprising:
-
providing a plurality of subsets of a query, each subset including a plurality of partitions; enumerating, using at least one thread, each partition of each subset; generating, using at least one thread, at least one physical access plan for each enumerated partition in parallel, wherein a number of threads that perform the enumerating and the generating is dynamically adapted according to a pool of threads available during the enumerating and the generating and a complexity of the query; and determining the access plan for the query from the at least one generated physical access plan. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A system for generating an access plan, comprising:
a query optimizer configured to; provide a plurality of subsets of a query, each subset including a plurality of partitions; initialize, using at least one thread, a plan enumeration phase, the plan enumeration phase configured to enumerate each partition of each subset; initialize, using at least one thread, a plan generation phase, the plan generation phase configured to generate at least one physical access plan for each enumerated partition in parallel with the plan enumeration phase, wherein a number of threads that perform the plan enumeration phase and the plan generation phase is dynamically adapted according to a pool of threads available during the plan enumeration phase and the plan generation phase, and a complexity of the query; and determine the access plan for the query from at least one generated physical access plan. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
17. A computer-readable medium, having instructions stored thereon, wherein the instructions cause a computing device to perform operations for generating an access plan, comprising:
-
providing a plurality of subsets of a query, each subset including a plurality of partitions; enumerating, using at least one thread;
each partition of each subset;generating, using at least one thread, at least one physical access plan for each enumerated partition in parallel, wherein a number of threads that perform the enumerating and the generation is dynamically adapted according to a pool of threads available during the enumerating and the generating and a complexity of the query; and determining the access plan for the query from the at least one generated physical access plan. - View Dependent Claims (18, 19, 20)
-
Specification