Abstract
We present a new approach to optimization of query languages using cached results of previously evaluated queries. It is based on the stack-based approach (SBA) and object-oriented query language SBQL. SBA assumes description of semantics in the form of abstract implementation of query/programming language constructs. Pragmatic universality of SBQL and its precise, formal operational semantics make it possible to investigate various crucial issues related to this kind of optimization. Two main issues are: organization of the cache enabling fast retrieval of cached queries and development of fast methods to recognize consistency of queries and incremental altering of cached query results after database updates. This paper is focused on the first issue concerning optimal, fast and transparent utilization of the result cache, involving methods of query normalization enabling higher reuse of cached queries with preservation of original query semantics and decomposition of complex queries into smaller ones. We present experimental results of the optimization that demonstrate the effectiveness of our technique.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Ali, M.A., Fernandes, A.A.A., Paton, N.W.: MOVIE: An Incremental Maintenance System for Materialized Object Views. In: Proc. of Data & Knowledge Engineering, vol. 47, pp. 131–166 (2003)
Blakeley, J.A., Larson, P., Tompa, W.M.: Efficiently Updating Materialized Views. In: Proc. of ACM SIGMOD, pp. 61-71 (1986)
Cattell, R.G.G., Barry, D.K. (eds.): The Object Data Standard: ODMG 3.0. Morgan Kaufmann, San Francisco (2000)
Chaudhuri, S., Krishnamurthy, R., Potamianos, S., Shim, K.: Optimizing Queries with Materialized Views. In: Proc. of Intl. Conf. on Data Engineering, pp. 190-200 (1995)
Chen, C.M., Roussopoulos, N.: The Implementation and Performance Evaluation of the ADMS Query Optimizer: Integrating Query Result Caching and Matching. In: Proc. of Intl. Conf. On Extending Database Technology (1994)
Chen, L., Rundensteiner, E.A.: ACE-XQ: A CachE-ware XQuery Answering System. In: Proc. of WebDB, pp. 31-36 (2002)
Cybula, P.: Cached Queries as an Optimization Method in the Object-Oriented Query Language SBQL, Ph.D. Thesis, Institute of Computer Science, Polish Academy of Sciences, Warsaw (2010) (in Polish)
Cybula, P., Kozankiewicz, H., Stencel, K., Subieta, K.: Optimization of Distributed Queries in Grid via Caching. In: Meersman, R., Tari, Z., Herrero, P. (eds.) OTM-WS 2005. LNCS, vol. 3762, pp. 387–396. Springer, Heidelberg (2005)
Cybula, P., Subieta, K.: Cached Queries in the Stack-Based Approach, Institute of Computer Science, Polish Academy of Sciences, Report 985, Warsaw (2005)
Cybula, P., Subieta, K.: Query Optimization through Cached Queries for Object-Oriented Query Language SBQL. In: van Leeuwen, J., Muscholl, A., Peleg, D., Pokorný, J., Rumpe, B. (eds.) SOFSEM 2010. LNCS, vol. 5901, pp. 308–320. Springer, Heidelberg (2010)
Dar, S., Franklin, M.J., Jonsson, B.T., Srivastava, D., Tan, M.: Semantic Data Caching and Replacement. In: Proc. of VLDB (1996)
IBM DB2 Universal Database SQL Reference, Version 8, vol. 2, (2002),Faster Federated Queries with MQTs. DB2 Magazine 8(3) (2003)
Kemper, A., Moerkotte, G.: Access Support in Object Bases. In: Proc. of ACM SIGMOD, pp. 364-376 (1990)
Kowalski, T., Wiślicki, J., Kuliberda, K., Adamus, R., Subieta, K.: Optimization by Indices in ODRA. In: Proceedings of the First International Conference on Object Databases, ICOODB 2008, pp. 97-117 (2008)
LINQ:NET Language-Integrated Query, Microsoft Corporation (February 2007)
Litwin, W.: Linear hashing: A new tool for file and table addressing. In: Proc. of 6th VLDB, pp. 212-223 (1980)
MySQL 5.4 Reference Manual, Chapter 7.5.5: The MySQL Query Cache (2009)
ODRA (Object Database for Rapid Application development), Description and Programmer Manual, http://sbql.pl/various/ODRA/ODRA_manual.html
Oracle 9i Materialized Views, An Oracle White Paper (May 2001), On Oracle Database 11g, Oracle Magazine XXI (5) (2007)
Rzeczkowski, W., Subieta, K.: Stored Queries – a Data Organization for Query Optimization. Proc. of Data & Knowledge Engineering 3, 29–48 (1988)
EL-Sayed, M., Wang, L., Ding, L., Rundensteiner, E.A.: An Algebraic Approach for Incremental Maintenance of Materialized XQuery Views. In: Proc. of WIDM (2002)
Subieta, K.: Theory and practice of object query languages. Polish-Japanese Institute of Information Technology (2004) (in Polish)
Subieta, K., Beeri, C., Matthes, F., Schmidt, J.W.: A Stack Based Approach to Query Languages. In: Proc. of 2nd Springer Workshops in Computing (1995)
Subieta, K., Rzeczkowski, W.: Query Optimization by Stored Queries. In: Proc. of VLDB, pp. 369-380 (1987)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Cybula, P., Subieta, K. (2010). Query Optimization by Result Caching in the Stack-Based Approach. In: Dearle, A., Zicari, R.V. (eds) Objects and Databases. ICOODB 2010. Lecture Notes in Computer Science, vol 6348. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-16092-9_7
Download citation
DOI: https://doi.org/10.1007/978-3-642-16092-9_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-16091-2
Online ISBN: 978-3-642-16092-9
eBook Packages: Computer ScienceComputer Science (R0)