Method and system for performing query optimization using a hybrid execution plan
AssigneeOracle International Corporation
InventorsAllison LEE, Mohamed ZAIT, Yali ZHU
Life of this patent
Estimating the term…
Abstract
An improved method, system, and computer program product is disclosed that provides a hybrid approach to optimization which allows different subsets of data accessed by a query to be optimized with different access paths and execution approaches. Transformations may be performed to re-write the query, which restructures the query in a way that facilitates the hybrid optimization process. Multiple transformations may be interleaved to produce an efficient re-written query.
Claims34
A computer implemented method for optimizing a query, comprising:
- receiving a query that accesses a set of a data having a first subset stored in a first type of storage medium and a second subset of the data stored in a second type of storage medium;
- using a processor to perform a transformation to re-write the query which results in a transformed query, wherein the transformed query comprises a first query portion that corresponds to the first subset that is stored in the first type of storage medium and a second query portion that corresponds to the second subset that is stored in the second type of storage medium;
- and
- optimizing the transformed query such that the first query portion corresponds to a first execution plan and the second query portion corresponds to a second execution plan, wherein the first execution plan is different from the second execution plan.
A computer-based system for optimizing a query, comprising:
- a computer processor to execute a set of program code instructions;
- a memory to hold the program code instructions, in which the program code instructions for:
- receiving a query that accesses a set of a data having a first subset of the data corresponding to a first type of storage medium and a second subset of the data corresponding to a second type of storage medium;
- using a processor to perform a transformation to re-write the query which results in a transformed query, wherein the transformed query comprises a first query portion that corresponds to the first subset associated with the first type of storage medium and a second query portion that corresponds to the second subset associated with the second type of storage medium;
- and
- optimizing the transformed query such that the first query portion corresponds to a first execution plan and the second query portion corresponds to a second execution plan, wherein the first execution plan is different from the second execution plan.
A computer program product embodied on a computer usable medium, the computer readable medium having stored thereon a sequence of instructions which, when executed by a processor causes the processor to execute a method for optimizing a query, the method comprising:
- receiving a query that accesses a set of a data having a first subset stored in a first type of storage medium and a second subset of the data stored in a second type of storage medium;
- using a processor to perform a transformation to re-write the query which results in a transformed query, wherein the transformed query comprises a first query portion that corresponds to the first subset that is stored in the first type of storage medium and a second query portion that corresponds to the second subset that is stored in the second type of storage medium;
- and
- optimizing the transformed query such that the first query portion corresponds to a first execution plan and the second query portion corresponds to a second execution plan, wherein the first execution plan is different from the second execution plan.
A computer implemented method for optimizing a query, comprising:
- receiving a query that accesses a set of a data having a first subset of the data corresponding to a first type of compression and a second subset of the data corresponding to a second type of compression;
- using a processor to perform a transformation to re-write the query which results in a transformed query, wherein the transformed query comprises a first query portion that corresponds to the first subset associated with the first type of compression and a second query portion that corresponds to the second subset associated with the second type of compression;
- and
- optimizing the transformed query such that the first query portion corresponds to a first execution plan and the second query portion corresponds to a second execution plan, wherein the first execution plan is different from the second execution plan.
A computer program product embodied on a computer usable medium, the computer readable medium having stored thereon a sequence of instructions which, when executed by a processor causes the processor to execute a method for optimizing a query, the method comprising:
- receiving a query that accesses a set of a data having a first subset of the data corresponding to a first type of compression property and a second subset of the data corresponding to a second type of compression property;
- using a processor to perform a transformation to re-write the query which results in a transformed query, wherein the transformed query comprises a first query portion that corresponds to the first subset associated with the first type of compression property and a second query portion that corresponds to the second subset associated with the second type of compression property;
- and
- optimizing the transformed query such that the first query portion corresponds to a first execution plan and the second query portion corresponds to a second execution plan, wherein the first execution plan is different from the second execution plan.
A computer-based system for optimizing a query, comprising:
- a computer processor to execute a set of program code instructions;
- a memory to hold the program code instructions, in which the program code instructions for:
- receiving a query that accesses a set of a data having a first subset of the data corresponding to a first type of compression and a second subset of the data corresponding to a second type of compression;
- using a processor to perform a transformation to re-write the query which results in a transformed query, wherein the transformed query comprises a first query portion that corresponds to the first subset associated with the first type of compression and a second query portion that corresponds to the second subset associated with the second type of compression;
- and
- optimizing the transformed query such that the first query portion corresponds to a first execution plan and the second query portion corresponds to a second execution plan, wherein the first execution plan is different from the second execution plan.
Dependencies are inferred from the claim text.