System and method for optimizing queries with aggregates and collection conversions
First Claim
Patent Images
1. A method of optimizing a query of a database comprisingtranslating the query into an internal language;
- identifying, in the translated query, candidates for optimization; and
applying a set of optimization rules to the identified candidates to form a transformed query;
where the query comprises an operation selected from the group consisting of aggregate operations and collection conversion operations; and
where the identified candidates comprise a translation of the operation selected from the group consisting of aggregate operations and collection conversion operations.
3 Assignments
0 Petitions
Accused Products
Abstract
Systems and methods for optimizing database queries involving aggregates identify instantiations of rules in an internal language representation of the original query, and then applies the rules to those instantiations to form an optimized query execution plan.
-
Citations
14 Claims
-
1. A method of optimizing a query of a database comprising
translating the query into an internal language; -
identifying, in the translated query, candidates for optimization; and
applying a set of optimization rules to the identified candidates to form a transformed query;
where the query comprises an operation selected from the group consisting of aggregate operations and collection conversion operations; and
where the identified candidates comprise a translation of the operation selected from the group consisting of aggregate operations and collection conversion operations. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
identifying candidates for optimization includes identifying one candidate for optimization, wherein applying a set of optimization rules includes applying the one of the set of optimization rules corresponding to the identified candidate, and further including repeating the identifying and applying operations until no other candidates can be identified. -
3. The method of claim 1 wherein
identifying candidates for optimization includes looking for predetermined patterns, and wherein applying a set of optimization rules includes applying a set of rules corresponding to the pattern. -
4. The method of claim 3, wherein looking for predetermined patterns includes
looking for horizontal grouping patterns. -
5. The method of claim 1, wherein the step of identifying query candidates includes
identifying a loop singleton instance. -
6. The method of claim 1, wherein the step of identifying query candidates includes
identifying a loop associate instance. -
7. The method of claim 1, wherein the step of identifying query candidates includes
identifying a loop operation instance. -
8. The method of claim 1, wherein the step of identifying query candidates includes
identifying a loop record algebra instance. -
9. The method of claim 1, wherein the step of identifying query candidates includes
identifying an operation record algebra instance. -
10. The method of claim 1, wherein the step of identifying query candidates includes
identifying a convert singleton instance. -
11. The method of claim 1, wherein the step of identifying query candidates includes
identifying a convert algebra instance. -
12. The method of claim 1, wherein the step of identifying query candidates includes
identifying a convert operation instance.
-
-
13. A computer system optimizing a query of a database comprising:
-
compiler means for translating the query into an internal language;
means for identifying, in the translated query, candidates for optimization; and
means for applying a set of optimization rules to the identified candidates to form a transformed query;
where the query comprises an operation selected from the group consisting of aggregate operations and collection conversion operations; and
where the identified candidates comprise a translation of the operation selected from the group consisting of aggregate operations and collection conversion operations. - View Dependent Claims (14)
means for identifying candidates for optimization includes means for identifying one candidate for optimization, wherein the means for applying a set of optimization rules includes means for applying the one of the set of optimization rules corresponding to the identified candidate, and further including means for activating the identifying means and the applying means until no other candidates can be identified.
-
Specification