System and method for enhanced query optimizer search space ordering
AssigneeSybase, Inc.
InventorAnisoara NICA
Life of this patent
Estimating the term…
Abstract
In an optimizer within a Relational Database Management System improved ways in which a search space (the universe of possible join combinations) is generated and managed and improved ways in which the elements of a search space are evaluated so that among other things unpromising elements are efficiently dropped (pruned).
Claims29
(canceled)
A computer-implemented method for selecting an optimal execution plan for a database request, the method comprising:
- processing aspects of the database request, including at least:
- enumerating certain of all possible valid logical plans, based on at least a maximum search space size, yielding enumerated logical plans,
- preserving, uncosted, certain or the enumerated logical plans, yielding a candidate search space,
- ordering entries in the candidate search space based on at least a dynamic scoring function, yielding a candidate search space order, and
- generating a physical plan for certain of the entries in the candidate search space, yielding generated physical plans, wherein the generating proceeds according to the candidate search space order and a dynamic budget function so as to efficiently drop unpromising entries;
- and
- reviewing a subset of the generated physical plans to select an optimal execution plan.
A computer readable medium having instructions stored thereon that when executed by a processor, cause the processor to perform operations for selecting an optimal execution plan for a database request, the operations comprising:
- processing aspects of the database request, including at least:
- enumerating certain of all possible valid logical plans, based on at least a maximum search space size, yielding enumerated logical plans,
- preserving, uncosted, certain of the enumerated logical plans, yielding a candidate search space,
- ordering entries in the candidate search space based on at least a dynamic scoring function, yielding a candidate search space order, and
- generating a physical plan for certain of the entries in the candidate search space, yielding generated physical plans, wherein the generating proceeds according to the candidate search space order and a dynamic budget function so as to efficiently drop unpromising entries;
- and
- reviewing a subset of the generated physical plans to select an optimal execution plan.
A system comprising:
- one or more processors;
- one or more computer readable media;
- and
- computer readable instructions stored on the one or more computer readable media that when executed by the one or more processors, cause the one or more processors to perform operations for selecting an optimal execution plan for a database request by:
- processing aspects of the database request, including at least:
- enumerating certain of all possible valid logical plans, based on at least a maximum search space size, yielding enumerated logical plans,
- preserving, uncosted, certain of the enumerated logical clans, yielding a candidate search space,
- ordering entries in the candidate search space based on at least a dynamic scoring function, yielding a candidate search space order,
- generating a physical plan for certain of the entries in the candidate search space, yielding generated physical plans, wherein the generating proceeds according to the candidate search space order and a dynamic budget function so as to efficiently drop unpromising entries, and
- reviewing a subset of the generated physical plans to select an optimal execution plan.
A system comprising:
- one or more processors;
- a memory coupled to at least one of the one or more processors;
- and
- a query optimizer residing in the memory that, when executed by at least one of the one or more processors:
- enumerates, for a database request, certain of all possible valid logical plans, based on at least a maximum search space size, yielding enumerated logical plans;
- preserves, uncosted, certain of the enumerated logical plans, yielding a candidate search space;
- orders entries in the candidate search space based on at least a dynamic scoring function, yielding a candidate search space order,
- generates a physical plan for certain of the entries in the candidate search space, yielding generated physical plans, wherein the generating proceeds according to the candidate search space order and a dynamic budget function so as to efficiently drop unpromising entries;
- and
- reviews a subset of the generated physical plans to select an optimal execution plan.
Dependencies are inferred from the claim text.