Efficient interaction among cost-based transformations
First Claim
Patent Images
1. A method of transforming a certain query, comprising:
- making a determination of whether or not to rewrite the certain query using a first transformation, wherein the determination includes;
applying the first transformation to the certain query to generate a first query;
generating a second query based on the first query by applying a second transformation;
determining a query execution cost of the second query; and
making the determination based on the query execution cost of the second query;
wherein query execution costs are determined for two or more semantically equivalent queries, the two or more semantically equivalent queries including at least the certain query and the second query;
wherein a candidate execution plan is generated for each semantically equivalent query of the two or more semantically equivalent queries; and
wherein the candidate execution plan for each semantically equivalent query of the two or more semantically equivalent queries is different than the candidate execution plan for each other semantically equivalent query of the two or more semantically equivalent queries;
wherein the steps of applying, generating, determining, and making the determination are performed by one or more computing devices.
1 Assignment
0 Petitions
Accused Products
Abstract
During query optimization, when a particular type of transformation is considered, the effect of performing one or more subsequent kinds of transformations is also considered in conjunction with the first. When applying a transformation, which forecloses applying another, both are considered independently.
119 Citations
38 Claims
-
1. A method of transforming a certain query, comprising:
-
making a determination of whether or not to rewrite the certain query using a first transformation, wherein the determination includes; applying the first transformation to the certain query to generate a first query; generating a second query based on the first query by applying a second transformation; determining a query execution cost of the second query; and making the determination based on the query execution cost of the second query; wherein query execution costs are determined for two or more semantically equivalent queries, the two or more semantically equivalent queries including at least the certain query and the second query;
wherein a candidate execution plan is generated for each semantically equivalent query of the two or more semantically equivalent queries; and
wherein the candidate execution plan for each semantically equivalent query of the two or more semantically equivalent queries is different than the candidate execution plan for each other semantically equivalent query of the two or more semantically equivalent queries;wherein the steps of applying, generating, determining, and making the determination are performed by one or more computing devices. - View Dependent Claims (2, 3, 4, 5, 6, 7, 21, 22, 23, 24, 25, 26, 27)
-
-
8. A method of transforming a certain query, comprising:
-
making a determination of whether or not to rewrite the certain query using a first transformation, wherein the determination includes; applying the first transformation to said certain query to generate a first query; applying a second transformation to the certain query to generate a second query; generating a first query execution cost for the first query; generating a second query execution cost for the second query; and wherein the determination is based on the first query execution cost and the second query execution cost; wherein query execution costs are determined for two or more semantically equivalent queries, the two or more semantically equivalent queries including at least the first query and the second query;
wherein a candidate execution plan is generated for each semantically equivalent query of the two or more semantically equivalent queries; and
wherein the candidate execution plan for each semantically equivalent query of the two or more semantically equivalent queries is different than the candidate execution plan for each other semantically equivalent query of the two or more semantically equivalent queries;wherein the steps of applying, generating, and making the determination are performed by one or more computing devices. - View Dependent Claims (9, 10, 35, 36)
-
-
11. A volatile or non-volatile computer-readable medium storing one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform:
-
making a determination of whether or not to rewrite a certain query using a first transformation, wherein the determination includes; applying the first transformation to the certain query to generate a first query; generating a second query based on the first query by applying a second transformation; determining a query execution cost of the second query; and making the determination based on the query execution cost the second query; wherein query execution costs are determined for two or more semantically equivalent queries, the two or more semantically equivalent queries including at least the certain query and the second query;
wherein a candidate execution plan is generated for each semantically equivalent query of the two or more semantically equivalent queries; and
wherein the candidate execution plan for each semantically equivalent query of the two or more semantically equivalent queries is different than the candidate execution plan for each other semantically equivalent query of the two or more semantically equivalent queries. - View Dependent Claims (12, 13, 14, 15, 16, 17, 28, 29, 30, 31, 32, 33, 34)
-
-
18. A volatile or non-volatile computer-readable medium storing one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform:
-
making a determination of whether or not to rewrite a certain query using a first transformation, wherein the determination includes; applying the first transformation to said certain query to generate a first query; applying a second transformation to the certain query to generate a second query; generating a first query execution cost for the first query; generating a second query execution cost for the second query; and wherein the determination is based on the first query execution cost and the second query execution cost; wherein query execution costs are determined for two or more semantically equivalent queries, the two or more semantically equivalent queries including at least the first query and the second query;
wherein a candidate execution plan is generated for each semantically equivalent query of the two or more semantically equivalent queries; and
wherein the candidate execution plan for each semantically equivalent query of the two or more semantically equivalent queries is different than the candidate execution plan for each other semantically equivalent query of the two or more semantically equivalent queries. - View Dependent Claims (19, 20, 37, 38)
-
Specification