Method, computer program product, and system for rewriting database queries in a heterogenous environment
First Claim
1. A method for performing query rewrite in a heterogeneous database environment that preserves optimal pushdownability comprising:
- storing the results of a pushdown analysis on a database query, said results including the pushdownability of portions of the database query;
rewriting a portion of the database query;
performing a pushdown analysis on the rewritten portion of the database query; and
if the pushdownability of the rewritten portion is greater than the pushdownability of the original portion, updating the stored results of the pushdown analysis to reflect the pushdownability of the rewritten portion of the database query.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, computer product, and system for rewriting database without decreasing pushdownability is provided. First, a pushdown analysis of the query in its entirety is performed prior to the application of any query rewrite rules in order to establish a baseline on pushdownability for the query. The results of this analysis is stored with the internal query representation. After each rule is applied to rewrite a portion of a query, that rewritten portion is analyzed again for pushdownability. If pushdownability is not decreased, then the rewritten query remains and the internal representation of the query is updated to reflect the pushdownability of that portion. If pushdownability is decreased, then an undo operation is applied to the rewritten portion of the query to back out the effects of the rule and leave the query in the same state as before the rewrite. Finally, additional rewrite rules that are directed to the heterogeneous database environment are also provided.
-
Citations
17 Claims
-
1. A method for performing query rewrite in a heterogeneous database environment that preserves optimal pushdownability comprising:
-
storing the results of a pushdown analysis on a database query, said results including the pushdownability of portions of the database query;
rewriting a portion of the database query;
performing a pushdown analysis on the rewritten portion of the database query; and
if the pushdownability of the rewritten portion is greater than the pushdownability of the original portion, updating the stored results of the pushdown analysis to reflect the pushdownability of the rewritten portion of the database query. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A computer program product comprising:
-
a computer usable medium; and
computer readable instructions embodied on said computer useable medium for performing query rewrite in a heterogeneous database environment that preserves optimal pushdownability, the instructions directing a computer to perform the steps of;
storing the results of a pushdown analysis on a database query, said results including the pushdownability of portions of the database query;
rewriting a portion of the database query;
performing a pushdown analysis on the rewritten portion of the database query; and
if the pushdownability of the rewritten portion is greater than the pushdownability of the original portion, updating the stored results of the pushdown analysis to reflect the pushdownability of the rewritten portion of the database query. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A system for performing query rewrite in a heterogeneous database environment that preserves optimal pushdownability comprising:
-
means for storing the results of a pushdown analysis on a database query, said results including the pushdownability of portions of the database query;
means for rewriting a portion of the database query;
means for performing a pushdown analysis on the rewritten portion of the database query; and
if the pushdownability of the rewritten portion is greater than the pushdownability of the original portion, means for updating the stored results of the pushdown analysis to reflect the pushdownability of the rewritten portion of the database query. - View Dependent Claims (12, 13, 14, 15)
-
-
16. A method for performing query rewrite in a heterogeneous database environment that preserves optimal pushdownability comprising:
-
rewriting a portion of the database query;
performing a pushdown analysis on the rewritten portion of the database query; and
if the pushdownability of the rewritten portion is less than the pushdownability of the original portion, undoing the rewrite of the portion of the database query. - View Dependent Claims (17)
-
Specification