Highly adaptable query optimizer search space generation process
AssigneeiAnywhere Solutions, Inc.
InventorsAnisoara Nica, Ian Lorne Charlesworth
Life of this patent
Estimating the term…
Abstract
Systems, methods and articles of manufacture for determining at least one algorithm from a pool of algorithms to optimize a query. An embodiment includes building optimization blocks for the subplan, determining the complexity of the subplan based on the optimization blocks and selecting an algorithm from a pool of search space generation algorithms based on complexity of the subplan and characteristics of the selected algorithm, and optimizing the subplan with the selected algorithm.
Claims17
A method for optimizing a search for a query, comprising:
- providing a subplan for an optimization block in the query;
- determining a maximum estimated cost for executing an access plan for the subplan using an inexpensive algorithm from a pool of search space generation algorithms;
- when the maximum estimated cost is greater than a threshold cost for generating the access plan for the subplan,
- analyzing algebraic properties of a hypergraph to determine complexity of the subplan for the optimization block;
- identifying characteristics of each algorithm from the pool of search space generation algorithms, wherein each algorithm is configured to generate an associated access plan for the subplan;
- and
- selecting an algorithm from the pool of search space generation algorithms based on the complexity of the subplan and characteristics of each algorithm;
- and
- when the maximum estimated cost is less than the threshold cost for generating the access plan for executing the subplan, selecting the inexpensive algorithm;
- and
- generating the access plan for the subplan using the selected algorithm to optimize the search for the query.
A system for optimizing a search for a query, comprising:
- a memory;
- a processor communicatively coupled to the memory;
- a pre-optimization module stored in the memory and executing on the processor and further configured to:
- provide a subplan for an optimization block in the query;
- determine a maximum estimated cost for an access plan for executing the subplan using an inexpensive algorithm from a pool of search space generation algorithms;
- when the maximum estimated cost is greater than a threshold cost for generating the access plan for the subplan,
- analyze algebraic properties of a hypergraph to determine complexity of the subplan for the optimization block;
- identify characteristics of each algorithm from the pool of search space generation algorithms, wherein each algorithm is configured to generate an associated access plan for the subplan;
- and
- select an algorithm from the pool of search space generation algorithms based on the complexity of the subplan and characteristics of each algorithm;
- and
- when the maximum estimated cost is less than the threshold cost for generating the access plan to execute the subplan, selecting the inexpensive algorithm;
- and
- an optimization module configured to:
- generate the access plan for the subplan using the selected algorithm to optimize the search for the query.
An article of manufacture including a non-transitory computer-readable medium having instructions stored thereon that, when executed by a computing device, cause said computing device to perform operations comprising:
- providing a subplan for an optimization block in the query;
- determining a maximum estimated cost for executing the subplan using an inexpensive algorithm from a pool of search space generation algorithms;
- when the maximum estimated cost is greater than a threshold cost for generating the access plan for the subplan,
- analyzing algebraic properties of a hypergraph to determine complexity of the subplan for the optimization block;
- identifying characteristics of each algorithm from the pool of search space generation algorithms, wherein each algorithm is configured to generate an associated access plan for the subplan;
- and
- selecting an algorithm from the pool of search space generation algorithms based on the complexity of the subplan and characteristics of each algorithm;
- and
- when the maximum estimated cost is less than the threshold cost for generating the access plan for the subplan, selecting the inexpensive algorithm;
- and
- generating the access plan for the subplan using the selected algorithm to optimize the search for the query.
Dependencies are inferred from the claim text.