Claims
- 1. A method for computing moving aggregates in an on-line analytical processing (OLAP) system, comprising:(a) identifying a plurality of simultaneously computable moving aggregate functions in a query, and (b) partitioning the identified moving aggregate functions into sets that can be computed simultaneously, and (c) generating an access plan that executes the partitioned sets simultaneously.
- 2. The method of claim 1, wherein a moving aggregate function is described by a tuple including a mnemonic for the function, an expression for the function, a width of tuples for computing the function, and a sort order for the function.
- 3. The method of claim 2, wherein the sort orders for simultaneously computable moving aggregate functions are equivalent.
- 4. The method of claim 3, wherein the simultaneously computable moving aggregate functions are partitioned into sets based on their sort orders.
- 5. The method of claim 4, further comprising performing only a single sort for each of the partitioned sets.
- 6. The method of claim 5, further comprising evaluating tree isomorphism for the access plan to identify equivalent sort orders.
- 7. The method of claim 6, wherein the evaluating step comprises checking, in a recursive fashion, whether operator trees of two or more access plans are equivalent.
- 8. The method of claim 1, wherein the generating step comprises expanding each operator node in the access plan containing moving aggregate functions into a set of operators equal to a number of sets.
- 9. The method of claim 8, wherein each set is computed in a mutually exclusive fashion.
- 10. An on-line analytical processing (OLAP) system that computes moving aggregates, comprising:(a) a computer system; (b) logic, performed by the computer system, for: (1) identifying a plurality of simultaneously computable moving aggregate functions in a query, and (2) partitioning the identified moving aggregate functions into sets that can be computed simultaneously; and (3) generating an access plan that executes the partitioned sets simultaneously.
- 11. An article of manufacture embodying logic for computing moving aggregates in an on-line analytical processing (OLAP) system, the logic comprising:(a) identifying a plurality of simultaneously computable moving aggregate functions in a query; and (b) partitioning the identified moving aggregate functions into sets that can be computed simultaneously; and (c) generating an access plan that executes the partitioned sets simultaneously.
CROSS REFERENCE TO RELATED APPLICATIONS
This application is related to the following co-pending and commonly assigned patent applications, all of which are incorporated by reference herein:
application Ser. No. 09/605,202, entitled “METHOD FOR DETERMINING THE COMPUTABILITY OF DATA FOR AN ACTIVE MULTI-DIMENSIONAL CACHE IN A RELATIONAL DATABASE MANAGEMENT SYSTEM,” filed on Jun. 27, 2000, by Prasad M. Deshpande, Karthikeyan Ramasamy, Amit Shukla, and Jeffrey F. Naughton,
application Ser. No. 09/583,364, entitled “ACTIVE CACHING FOR MULTI-DIMENSIONAL DATA SETS IN A RELATIONAL DATABASE MANAGEMENT SYSTEM,” filed on May 31, 2000, by Prasad M. Deshpande, Karthikeyan Ramasamy, Amit Shukla, and Jeffrey F. Naughton; and
application Ser. No. 09/449,085, entitled “QUERY MONITOR PLAYBACK MECHANISM FOR POST-MORTEM PERFORMANCE ANALYSIS,” filed on Nov. 24, 1999, by Karthikeyan Ramasamy, Jie-Bing Yu, and Jun Li.
US Referenced Citations (5)
Number |
Name |
Date |
Kind |
5546570 |
McPherson et al. |
Aug 1996 |
A |
5850547 |
Waddington et al. |
Dec 1998 |
A |
6081801 |
Cochrane et al. |
Jun 2000 |
A |
6275818 |
Subramanian et al. |
Aug 2001 |
B1 |
6289334 |
Reiner et al. |
Sep 2001 |
B1 |
Non-Patent Literature Citations (1)
Entry |
N. Kabra and D.J. DeWitt (1999) “OPT++: an object-oriented implementation for extensible database query optimization,” The VLDB Journal 8:55-78. |