skip to main content
10.1145/1385269.1385273acmconferencesArticle/Chapter ViewAbstractPublication PagesmodConference Proceedingsconference-collections
research-article

Unit-testing query transformation rules

Published: 13 June 2008 Publication History

Abstract

The process of validating the internal functionality of a query optimizer includes the selection of appropriate queries to be used as test cases for exercising and validating specific code paths. Specifically, it is desirable to be able to implement unit-tests for small components of the query optimizer such as the query transformation rules.
In this paper, we present a practical method that simplifies the creation of test cases for validating query transformation rules in a query optimizer. We present the QRel programming framework, which allows designing test cases based on relational algebra expressions. We show how such a framework can be used to create classes of similar test cases that exercise transformation rules over a variety of relational algebra expressions. Finally, we provide some examples of how QRel is used to validate SQL Server's optimizations for subqueries.

References

[1]
Bati, H., Giakoumakis, L., Herbert, S., and Surna, A. 2007. A genetic approach for random testing of database systems. In Proc. of the 33rd Int'l. Conf. on Very Large Data Bases (Vienna, Austria, September 23 - 27, 2007), 1243--1251.
[2]
Cherniack, M. and Zdonik, S. B. 1996. Rule languages and internal algebras for rule-based optimizers. SIGMOD Rec. 25, 2 (Jun. 1996), 401--412.
[3]
Cohen, D. M., Dalal, S. R., Parelius, J., and Patton, G. C. 1996. The Combinatorial Design Approach to Automatic Test Generation. IEEE Software 13, 5 (Sep. 1996), 83--88.
[4]
Elhemali, M., Galindo-Legaria, C. A., Grabs, T., and Joshi, M. M. 2007. Execution strategies for SQL subqueries. In Proc. of the 2007 ACM SIGMOD Int'l. Conf. on Management of Data (Beijing, China, June 11--14, 2007), 993--1004
[5]
Gamma E., Helm R., Johnson R., Vlissides J., Design patterns: elements of reusable object-oriented software, Addison-Wesley Longman Publishing Co. Inc., 1995
[6]
Giakoumakis, L and Galindo-Legaria, C. Testing SQL Server's Query Optimizer: Challenges, Techniques and Experiences. IEEE Data Engineering Bulletin, 31, 1 (March 2008), 37--44
[7]
Graefe G. and DeWitt D. J., The EXODUS Optimizer Generator. In Proc. of the ACM SIGMOD Int'l. Conf. on Management of Data (San Francisco, CA, USA, May 1987), 160--172.
[8]
Graefe G. and McKenna W. J. The Volcano Optimizer Generator: Extensibility and Efficient Search. In Proc. of the IEEE Int'l. Conf. on Data Engineering (Vienna, Austria, April 1993), 209--218.
[9]
TPC Benchmark H. Decision Support. http://www.tpc.org

Cited By

View all
  • (2024)Unified Query Optimization in the Fabric Data WarehouseCompanion of the 2024 International Conference on Management of Data10.1145/3626246.3653369(18-30)Online publication date: 9-Jun-2024
  • (2015)Transparent inclusion, utilization, and validation of main memory domain indexesProceedings of the 27th International Conference on Scientific and Statistical Database Management10.1145/2791347.2791375(1-12)Online publication date: 29-Jun-2015
  • (2012)Query optimization in microsoft SQL server PDWProceedings of the 2012 ACM SIGMOD International Conference on Management of Data10.1145/2213836.2213953(767-776)Online publication date: 20-May-2012
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
DBTest '08: Proceedings of the 1st international workshop on Testing database systems
June 2008
74 pages
ISBN:9781605582337
DOI:10.1145/1385269
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 13 June 2008

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. query optimization
  2. testing
  3. verification

Qualifiers

  • Research-article

Conference

SIGMOD/PODS '08
Sponsor:

Acceptance Rates

Overall Acceptance Rate 31 of 56 submissions, 55%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 16 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Unified Query Optimization in the Fabric Data WarehouseCompanion of the 2024 International Conference on Management of Data10.1145/3626246.3653369(18-30)Online publication date: 9-Jun-2024
  • (2015)Transparent inclusion, utilization, and validation of main memory domain indexesProceedings of the 27th International Conference on Scientific and Statistical Database Management10.1145/2791347.2791375(1-12)Online publication date: 29-Jun-2015
  • (2012)Query optimization in microsoft SQL server PDWProceedings of the 2012 ACM SIGMOD International Conference on Management of Data10.1145/2213836.2213953(767-776)Online publication date: 20-May-2012
  • (2011)Plan space analysisProceedings of the Fourth International Workshop on Testing Database Systems10.1145/1988842.1988844(1-6)Online publication date: 13-Jun-2011
  • (2010)A framework for testing DBMS featuresThe VLDB Journal — The International Journal on Very Large Data Bases10.1007/s00778-009-0157-y19:2(203-230)Online publication date: 1-Apr-2010
  • (2009)A framework for testing query transformation rulesProceedings of the 2009 ACM SIGMOD International Conference on Management of data10.1145/1559845.1559874(257-268)Online publication date: 29-Jun-2009

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media