Claims
- 1. A method for analyzing a query in an on-line analytical processing (OLAP) system, comprising:(a) converting the query into an operator tree; (b) generating a dependency graph to identify shared computations of user-defined metrics in the query using a depth-first traversal of the operator tree; and (c) generating an access plan from the operator tree using the dependency graph.
- 2. The method of claim 1, wherein the generating step (b) comprises identifying dependencies among metrics based on expressions, aggregations, and other metrics used by the metrics.
- 3. The method of claim 2, wherein the generating step (c) comprises generating the access plan based on the identified dependencies.
- 4. The method of claim 1, further comprising assigning operators based on the generated access plan.
- 5. The method of claim 4, wherein the access plan ensures that expressions, aggregations, and metrics are computed before they are needed, and that required values and intermediate results are passed up a tree structure of the access plan until they are used or consumed by an operator.
- 6. The method of claim 4, wherein the assigning step comprises generating project list expressions for each operator, aggregations to be computed in each operator, and input and output tuple types for each operator.
- 7. The method of claim 1, further comprising executing the access plan, further comprising computing expressions and aggregations by re-using and sharing subparts of the expressions and aggregations.
- 8. An on-line analytical processing (OLAP) system that analyzes a query, comprising:(a) a computer system; (b) logic, performed by the computer system, for: (1) converting the query into an operator tree; (2) generating a dependency graph to identify shared computations of user-defined metrics in the query using a depth-first traversal of the operator tree; and (3) generating an access plan from the operator tree using the dependency graph.
- 9. The system of claim 8, wherein the logic for generating (2) comprises logic for identifying dependencies among metrics based on expressions, aggregations, and other metrics used by the metrics.
- 10. The system of claim 9, wherein the logic for generating (3) comprises logic for generating the access plan based on the identified dependencies.
- 11. The system of claim 8, further comprising logic for assigning operators based on the generated access plan.
- 12. The system of claim 11, wherein the access plan ensures that expressions, aggregations, and metrics are computed before they are needed, and that required values and intermediate results are passed up a tree structure of the access plan until they are used or consumed by an operator.
- 13. The system of claim 11, wherein the logic for assigning comprises logic for generating project list expressions for each operator, aggregations to be computed in each operator, and input and output tuple types for each operator.
- 14. The system of claim 8, further comprising logic for executing the access plan, further comprising logic for computing expressions and aggregations by re-using and sharing subparts of the expressions and aggregations.
- 15. An article of manufacture embodying logic for analyzing a query in an on-line analytical processing (OLAP) system, the logic comprising:(a) converting the query into an operator tree; (b) generating a dependency graph to identify shared computations of user-defined metrics in the query using a depth-first traversal of the operator tree; and (c) generating an access plan from the operator tree using the dependency graph.
- 16. The article of manufacture of claim 15, wherein the generating step (b) comprises identifying dependencies among metrics based on expressions, aggregations, and other metrics used by the metrics.
- 17. The article of manufacture of claim 16, wherein the generating step (c) comprises generating the access plan based on the identified dependencies.
- 18. The article of manufacture of claim 15, further comprising assigning operators based on the generated access plan.
- 19. The article of manufacture of claim 18, wherein the access plan ensures that expressions, aggregations, and metrics are computed before they are needed, and that required values and intermediate results are passed up a tree structure of the access plan until they are used or consumed by an operator.
- 20. The article of manufacture of claim 18, wherein the assigning step comprises generating project list expressions for each operator, aggregations to be computed in each operator, and input and output tuple types for each operator.
- 21. The article of manufacture of claim 15, further comprising executing the access plan, further comprising computing expressions and aggregations by re-using and sharing subparts of the expressions and aggregations.
CROSS REFERENCE TO RELATED APPLICATIONS
This application is related to the following co-pending and commonly assigned patent application, all of which are incorporated by reference herein:
application Ser. No. 09/584,510, entitled “EFFICIENT EXCEPTION HANDLING DURING ACCESS PLAN EXECUTION IN AN ON-LINE ANALYTIC PROCESSING SYSTEM,” filed on May 31, 2000, by Karthikeyan Ramasamy, Prasad M. Deshpande, Amit Shukla, and Jeffrey F. Naughton;
application Ser. No. 09/583,633, entitled “SIMULTANEOUS COMPUTATION OF MULTIPLE MOVING AGGREGATES IN A RELATIONAL DATABASE MANAGEMENT SYSTEM,” filed on May 31, 2000, by Karthikeyan Ramasamy, Prasad M. Deshpande, Arnit Shukla, and Jeffrey F. Naughton;
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, Iarthikeyan 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 |
5553234 |
Cotner et al. |
Sep 1996 |
A |
6167396 |
Lokken |
Dec 2000 |
A |
6182061 |
Matsuzawa et al. |
Jan 2001 |
B1 |
6275818 |
Subramanian et al. |
Aug 2001 |
B1 |
6434544 |
Bakalash et al. |
Aug 2002 |
B1 |
Non-Patent Literature Citations (13)
Entry |
Goil et al. “A parallel scalable infrastructure for OLAP and data mining”, IEEE, IDEAS, 1999, pp. 178-186.* |
Jurgens et al. “The R/sub a/*-tree: an improved R*-tree with materialized data for supporting range queries on OLAP-data”, IEEE, Database and Expert Systems Applications, 1998, pp. 186-191.* |
Kabra et al. “OPT++: an object-oriented implementation for extensible database query optimization”, The VLDB Journal, Jan. 1999, pp. 55-78.* |
Shukla et al. “Materialized View Selection for Multidimensional Datasets”, Proceedings of the 24th VLDB Conference, 1998, pp. 488-499.* |
J. Patel et al., Building a Scalable Geo-Spatial DBMS: Technology, Implementation, and Evaluation, SIGMOD 1997, Proceedings ACM SIGMOD International Conference, pp. 1-12. |
D. De Witt et al., “Client-Server Paradise,” Proceedings of the 20th VLDB Conference, Santiago, Chile, 1994 pp. 1-12. |
“Opt++: An Object-Oriented Design for Extensible Database Query Optimization,” with David J. DeWitt, The VLDB Journal, vol. 8, Issue 1, Jan. 1999 pp. 55-78. |
S. Dar et al., “Semantic Data Caching and Replacement,” Proc. of the 22nd Int. VLDB Conf., 1996 pp. 330-341. |
P.M. Desphpande et al., “Caching Multidimensional Queries Using Chunks,” Proc. of ACM SIGMOD Int. Conf. on Mgmt. of Data, 1998, 259-270. |
A. Shukla et al., “Storage Estimation for Multidimensional Aggregates in the Prescence of Hierarchies,” Proc. of the 22nd Int. VLDB Conf., 1996, 522-531. |
A. Shukla et al., “Materialized View Selection for Multidimensional Datasets,” Proc. of the 24th Int. VLDB conf., 1998, 488-499. |
Y. Zhao et al., “An Array-Based Algorithm for Simultaneous Multidimensional Aggregates,” Proc. ACM SIGMOD Int. Conf. on Management of Data, 1997, 159-170. |
N. Pendse, R. Creeth, The OLAP Report available at http://www.olapreport.com Feb. 26, 2001. |