On the optimal ordering of maps and selections under factorization

Thomas Neumann, Sven Helmer, Guido Moerkotte

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

9 Scopus citations

Abstract

The query optimizer of a database system is confronted with two aspects when handling user-defined functions (UDFs) in query predicates: the vast differences in evaluation costs between UDFs (and other functions) and multiple calls of the same (expensive) UDF. The former is dealt with by ordering the evaluation of the predicates optimally, the latter by identifying common subexpressions and thereby avoiding costly recomputation. Current approaches order n predicates optimally (neglecting factorization) in O(n log n). Their result may deviate significantly from the optimal solution under factorization. We formalize the problem of finding optimal orderings under factorization and prove that it is NP-hard. Furthermore, we show how to improve on the run time of the brute-force algorithm (which computes all possible orderings) by presenting different enhanced algorithms. Although in the worst case these algorithms obviously still behave exponentially, our experiments demonstrate that for real-life examples their performance is much better.

Original languageEnglish
Title of host publicationProceedings - 21st International Conference on Data Engineering, ICDE 2005
Pages490-501
Number of pages12
DOIs
StatePublished - 2005
Externally publishedYes
Event21st International Conference on Data Engineering, ICDE 2005 - Tokyo, Japan
Duration: 5 Apr 20058 Apr 2005

Publication series

NameProceedings - International Conference on Data Engineering
ISSN (Print)1084-4627

Conference

Conference21st International Conference on Data Engineering, ICDE 2005
Country/TerritoryJapan
CityTokyo
Period5/04/058/04/05

Fingerprint

Dive into the research topics of 'On the optimal ordering of maps and selections under factorization'. Together they form a unique fingerprint.

Cite this