Claims Analysis
Total Claims: 17
Claim 1
Independent Claim
94 words
A method for optimization of a query invoking relational database tables and foreign functions, said method comprising: (a) providing rewrite rules for the foreign functions; (b) receiving an input query to be executed; (c) generating alternative queries from the input query and the rewrite rules by determining if a left-side of at least one of the rewrite rules is equivalent to at least a portion of the query using substitution mapping; (d) generating an optimal plan for each said alternative query; and (e) selecting for execution a lowest cost plan among said optimal plans.
Claim 2
Independent Claim
94 words
A method for optimization of a query invoking relational database tables and foreign functions, said method comprising: (a) providing rewrite rules for the foreign functions; (b) receiving an input query to be executed; (c) generating alternative queries from the input query and the rewrite rules by determining if a left-side of at least one of the rewrite rules is equivalent to at least a portion of the query using substitution mapping; (d) generating an optimal plan for each said alternative query; and (e) selecting for execution a lowest cost plan among said optimal plans.
Claim 3
Dependent Claim
43 words
A method as recited in claim 1, wherein said generating step (d) comprises: (d1) generating optimal plans for the input query and for at least one of the alternative queries; and (d2) selecting for execution a lowest cost plan among said optimal plans.
Claim 4
Dependent Claim
19 words
A method as recited in claim 2, wherein said generating step (d1) exploits commonality among queries across multiple queries.
Claim 5
Dependent Claim
105 words
A relational database management system, comprising: A relational database having a plurality of tuples; means for accessing at least one foreign function having declarative rewrite rules associated therewith; and an optimizer for optimizing a query accessing said relational database and said at least one foreign function using cost information; wherein said rewrite rules associated with each of said at least one foreign functions are expressed in a high-level declarative language which is an extension of SQL having the form REWRITE Query 1 AS Query 2; and wherein said optimizer uses said rewrite rules to generate equivalent queries by making substitutions indicated by said rewrite rules.
Claim 6
Dependent Claim
105 words
A relational database management system, comprising: A relational database having a plurality of tuples; means for accessing at least one foreign function having declarative rewrite rules associated therewith; and an optimizer for optimizing a query accessing said relational database and said at least one foreign function using cost information; wherein said rewrite rules associated with each of said at least one foreign functions are expressed in a high-level declarative language which is an extension of SQL having the form REWRITE Query 1 AS Query 2; and wherein said optimizer uses said rewrite rules to generate equivalent queries by making substitutions indicated by said rewrite rules.
Claim 7
Dependent Claim
20 words
A relational database management system as recited in claim 4, wherein an optimal plan is selected from said equivalent queries.
Claim 8
Dependent Claim
21 words
A relational database management system as recited in claim 4, wherein the cost information comprises cost information on the foreign functions.
Claim 9
Dependent Claim
83 words
A relational database management system, comprising: a relational database having a plurality of tuples; at least one foreign function having declarative rewrite rules associated therewith; and an optimizer for optimizing a query accessing said relational database and said at least one foreign function using cost information; wherein said rewrite rules are used to generate equivalent queries by substituting a right-hand side of a rewrite rule for at least a portion of the query which corresponds to a left-hand side of the rewrite rule.
Claim 10
Dependent Claim
83 words
A relational database management system, comprising: a relational database having a plurality of tuples; at least one foreign function having declarative rewrite rules associated therewith; and an optimizer for optimizing a query accessing said relational database and said at least one foreign function using cost information; wherein said rewrite rules are used to generate equivalent queries by substituting a right-hand side of a rewrite rule for at least a portion of the query which corresponds to a left-hand side of the rewrite rule.
Claim 11
Dependent Claim
34 words
A relational database management system as recited in claim 7, wherein said optimizer uses substitution mapping to determine if one of the rewrite rules is applicable to at least a portion of the query.
Claim 12
Dependent Claim
33 words
A relational database management system as recited in claim 7, wherein the rewrite rules are stored in a rule table indexed on the conjuncts that appear on the left-side of the rewrite rules.
Claim 13
Dependent Claim
20 words
A relational database management system as recited in claim 7, wherein said optimizer exploits commonality among queries across multiple queries.
Claim 14
Dependent Claim
32 words
A relational database management system as recited in claim 10, wherein said relational database system further comprises a plan table which stories previously determined optimal plans for subqueries to exploit the commonality.
Claim 15
Dependent Claim
28 words
A relational database management system as recited in claim 10, wherein said plan table is a hash-table where each subquery is represented as a sorted list of integers.
Claim 16
Dependent Claim
92 words
A query optimization system for optimizing a query invoking relational database tables and foreign functions, said system comprising: means for providing, in a high-level declarative language which is an extension of SQL, rewrite rules for the foreign functions of the form REWRITE Query 1 AS Query 2; means for providing cost information for the foreign functions; means for receiving a query to be executed; means for generating alternative queries from the query and the rewrite rules; means for generating an optimal plan using the cost information; means for executing said optimal plan.
Claim 17
Dependent Claim
92 words
A query optimization system for optimizing a query invoking relational database tables and foreign functions, said system comprising: means for providing, in a high-level declarative language which is an extension of SQL, rewrite rules for the foreign functions of the form REWRITE Query 1 AS Query 2; means for providing cost information for the foreign functions; means for receiving a query to be executed; means for generating alternative queries from the query and the rewrite rules; means for generating an optimal plan using the cost information; means for executing said optimal plan.