Skip to main content

On the Optimal Ordering of Maps, Selections, and Joins Under Factorization

  • Conference paper
Flexible and Efficient Information Handling (BNCOD 2006)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 4042))

Included in the following conference series:

Abstract

We examine the problem of producing the optimal evaluation order for queries containing joins, selections, and maps. Specifically, we look at the case where common subexpressions involving expensive UDF calls can be factored out. First, we show that ignoring factorization during optimization can lead to plans that are far off the best possible plan: the difference in cost between the best plan considering factorization and the best plan not considering factorization can easily reach several orders of magnitude. Then, we introduce optimization strategies that produce optimal left-deep and bushy plans when factorization is taken into account. Experiments (1) confirm that factorization is a critical issue when it comes to generating optimal plans and (2) we show that to consider factorization does not make plan generation significantly more expensive.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Bendtsen, J., Nielsen, H., von Heijne, G., Brunak, S.: Improved prediction of signal peptides: SignalP 3.0. J. Mol. Biol. 340, 783–795 (2004)

    Article  Google Scholar 

  2. Bird, R., Wadler, P.: An Introduction to Functional Programming. Prentice-Hall, Englewood Cliffs (1988)

    Google Scholar 

  3. Blobel, G.: Protein targeting. ChemBioChem 1, 86–102 (2000)

    Article  Google Scholar 

  4. Chaudhuri, S., Ganesan, P., Sarawagi, S.: Factorizing complex predicates in queries to exploit indexes. In: Proc. of the ACM SIGMOD Conf. on Management of Data, pp. 361–372 (2003)

    Google Scholar 

  5. Chaudhuri, S., Shim, K.: Optimization of queries with user-defined predicates. In: Proc. Int. Conf. on Very Large Data Bases (VLDB), pp. 87–98 (1996)

    Google Scholar 

  6. Chaudhuri, S., Shim, K.: Optimization of queries with user-defined predicates. ACM Trans. on Database Systems 24(2), 177–228 (1999)

    Article  Google Scholar 

  7. Hellerstein, J.: Predicate migration: Optimizing queries with expensive predicates. In: Computer Science Division, EECS Department, University of California at Berkeley (December 1992)

    Google Scholar 

  8. Hellerstein, J.: Practical predicate placement. In: Proc. of the ACM SIGMOD Conf. on Management of Data, pp. 325–335 (1994)

    Google Scholar 

  9. Hellerstein, J., Naughton, J.: Query execution techniques for caching expensive methods. In: Proc. of the ACM SIGMOD Conf. on Management of Data, pp. 423–434 (1996)

    Google Scholar 

  10. Hellerstein, J., Stonebraker, M.: Predicate migration: Optimizing queries with expensive predicates. In: Proc. of the ACM SIGMOD Conf. on Management of Data, pp. 267–277 (1993)

    Google Scholar 

  11. Ibaraki, T., Kameda, T.: On the optimal nesting order for computing n-relational joins. ACM Transactions on Database Systems 9(3), 482–502 (1984)

    Article  MathSciNet  Google Scholar 

  12. Kemper, A., Moerkotte, G., Peithner, K., Steinbrunn, M.: Optimizing disjunctive queries with expensive predicates. In: Proc. of the ACM SIGMOD Conf. on Management of Data, pp. 336–347 (1994)

    Google Scholar 

  13. Kemper, A., Moerkotte, G., Steinbrunn, M.: Optimization of boolean expressions in object bases. In: Proc. Int. Conf. on Very Large Data Bases (VLDB), pp. 79–90 (1992)

    Google Scholar 

  14. Neumann, T., Helmer, S., Moerkotte, G.: On the optimal ordering of maps and selections under factorization. In: Proc. IEEE Conference on Data Engineering, pp. 490–501 (2005)

    Google Scholar 

  15. Ono, K., Lohman, G.: Measuring the complexity of join enumeration in query optimization. In: Proc. Int. Conf. on Very Large Data Bases (VLDB), pp. 314–325 (1990)

    Google Scholar 

  16. Scheufele, W., Moerkotte, G.: Optimal ordering of selections and joins in acyclic queries with expensive predicates. Technical Report 96-3, RWTH-Aachen (1996)

    Google Scholar 

  17. Scheufele, W., Moerkotte, G.: Efficient dynamic programming algorithms for ordering expensive joins and selections. In: Schek, H.-J., Saltor, F., Ramos, I., Alonso, G. (eds.) EDBT 1998. LNCS, vol. 1377, pp. 201–215. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  18. Steinbrunn, M., Peithner, K., Moerkotte, G., Kemper, A.: Bypassing joins in disjunctive queries. In: Proc. Int. Conf. on Very Large Data Bases (VLDB), pp. 228–238 (1995)

    Google Scholar 

  19. Yajima, K., Kitagawa, H., Yamaguchi, K., Ohbo, N., Fujiwara, Y.: Optimization of queries including adt functions. In: International Symposium on Database Systems for Advanced Applications, pp. 366–376 (1991)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Neumann, T., Helmer, S., Moerkotte, G. (2006). On the Optimal Ordering of Maps, Selections, and Joins Under Factorization. In: Bell, D.A., Hong, J. (eds) Flexible and Efficient Information Handling. BNCOD 2006. Lecture Notes in Computer Science, vol 4042. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11788911_10

Download citation

  • DOI: https://doi.org/10.1007/11788911_10

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-35969-2

  • Online ISBN: 978-3-540-35971-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics