Skip to main content
Log in

Partial Evaluation of Views

  • Published:
Journal of Intelligent Information Systems Aims and scope Submit manuscript

Abstract

Many database applications and environments, such as mediation over heterogeneous database sources and data warehousing for decision support, lead to complex queries. Queries are often nested, defined over previously defined views, and may involve unions. There are good reasons why one might want to “remove” pieces (sub-queries or sub-views) from such queries: some sub-views of a query may be effectively cached from previous queries, or may be materialized views; some may be known to evaluate empty, by reasoning over the integrity constraints; and some may match protected queries, which for security cannot be evaluated for all users.

In this paper, we present a new evaluation strategy with respect to queries defined over views, which we call tuple-tagging, that allows for an efficient “removal” of sub-views from the query. Other approaches to this are to rewrite the query so the sub-views to be removed are effectively gone, then to evaluate the rewritten query. With the tuple tagging evaluation, no rewrite of the original query is necessary.

We describe formally a discounted query (a query with sub-views marked that are to be considered as removed), present the tuple tagging algorithm for evaluating discounted queries, provide an analysis of the algorithm's performance, and present some experimental results. These results strongly support the tuple-tagging algorithm both as an efficient means to effectively remove sub-views from a view query during evaluation, and as a viable optimization strategy for certain applications. The experiments also suggest that rewrite techniques for this may perform worse than the evaluation of the original query, and much worse than the tuple tagging approach.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  • Chakravarthy, U., Grant, J., and Minker, J. (1990). Logic-Based Approach to Semantic Query Optimization. ACM TODS, 15(2), 162-207.

    Google Scholar 

  • Chaudhuri, S., Krishnamurthy, R., Potamianos, S., and Shim, K. (1995). Optimizing Queries with Materialized Views. In Proceedings of the 11th ICDE, pp. 190-200.

  • Cheng, Q., Gryz, J., Koo, F., Leung, C., Liu, L., Qian, X., and Schiefer, B. (1999). Implementation of Two Semantic Query Optimization Techniques in DB2 Universal Database. In Proceedings of the 25th VLDB, Edinburgh, Scotland.

  • Based Optimizers. In Proc. SIGMOD (pp. 401-412).

  • Dar, S., Franklin, M., Jonsson, B., Srivastava, D., and Tan, M. (1996). Semantic Data Caching and Replacement. In Proceedings of 22nd VLDB (pp. 330-341).

  • Das, D. and Batory, D. (1995). Prairie: A Rule Specification Framework for Query Optimizers. In Proceedings of ICDE (pp. 201-210).

  • Freytag, J. (1987). A Rule-Based View of Query Optimization. In SIGMOD Proceedings (pp. 173-180), ACM.

  • Godfrey, P. and Gryz, J. (1996). A Framework for Intensional Query Optimization. In Proceedings of DDLP'96, Bonn, Germany (pp. 57-68).

  • Godfrey, P. and Gryz, J. (1999). Answering Queries by Semantic Caches. In Proceedings of 10th DEXA, Florence, Italy.

  • Godfrey, P. and Gryz, J. (1999). View Disassembly. In Proceedings of 7th ICDT, Jerusalem, Israel (pp. 417-434).

  • Godfrey, P., Gryz, J., and Minker J. (1996). Semantic Query Optimization for Bottom-Up Evaluation. In Z. Ras and M. Michalewicz (Eds.), Proc. of the 9th ISMIS, Zakopane, Poland (pp. 561-571).

  • Lakshmanan, L.V.S. and Hernandez, H.J. (1991). Structural Query Optimization-A Uniform Framework for Semantic Query Optimization in Deductive Databases. In Proc. PODS (pp. 102-114).

  • Lakshmanan, L.V.S. and Missaoui, R. (1995). Pushing Semantics Inside Recursion: A General Framework for Semantic Optimization of Recursive Queries. In Proc. ICDE (pp. 211-220).

  • Larson, P.-A. and Yang, H. (1985). Computing Queries from Derived Relations. In Proc. of 11th VLDB (pp. 259-269).

  • Lee, S., Henschen, L.J., and Qadah, G. (1991). Semantic Query Reformulation in Deductive Databases. In Proc. ICDE (pp. 232-239).

  • Levy, A.Y., Mendelzon, A.O., Sagiv, Y., and Srivastava, D. (1995). Answering Queries Using Views. In Proc. PODS (pp. 95-104).

  • Lloyd, J. (1987). Foundations of Logic Programming. Berlin: Springer-Verlag, 2nd edn.

    Google Scholar 

  • Melton, J. and Simon, A.R. (1993). Understanding the New SQL: A Complete Guide. San Mateo, California: Morgan Kaufmann.

    Google Scholar 

  • Pirahesh, H., Hellerstein, J.M., and Hasan, W. (1992). Extensible/Rule Based Query Rewrite Optimization in Starburst. In Proc. SIGMOD (pp. 39-48).

  • Qian, X. (1996). Query Folding. In Proceedings of the 12th ICDE (pp. 48-55).

  • Sellis, T. and Ghosh, S. (1990). On the Multiple-Query Optimization Problem. TKDE, 2(2), 262-266.

    Google Scholar 

  • Thuraisingham, B. and Ford, W. (1995). Security Constraint Processing in a Multilevel Secure Distributed Database Management System. TKDE, 7(2), 274-293.

    Google Scholar 

  • Transaction Processing Performance Council. (1998). 777 No. First Street, Suite 600, San Jose, CA 95112-6311, www.tpc.org. TPC Benchmark TM D, 1.3.1 edn.

  • Ullman, J.D. (1998). Principles of Database and Knowledge-Base Systems. Principles of Computer Science Series. Rockville, Maryland, 20850: Computer Science Press.

    Google Scholar 

  • Yernani, R., Papakonstantinou, Y., Abiteboul, S., and Garcia-Molina, H. (1998). Fusion Queries Over Internet Databases. In Proceedings of the 6th EDBT (pp. 57-71).

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Godfrey, P., Gryz, J. Partial Evaluation of Views. Journal of Intelligent Information Systems 16, 21–39 (2001). https://doi.org/10.1023/A:1008736910058

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/A:1008736910058

Navigation