TY - GEN
T1 - On the optimal ordering of maps and selections under factorization
AU - Neumann, Thomas
AU - Helmer, Sven
AU - Moerkotte, Guido
PY - 2005
Y1 - 2005
N2 - 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.
AB - 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.
UR - http://www.scopus.com/inward/record.url?scp=28444486308&partnerID=8YFLogxK
U2 - 10.1109/ICDE.2005.97
DO - 10.1109/ICDE.2005.97
M3 - Conference contribution
AN - SCOPUS:28444486308
SN - 0769522858
T3 - Proceedings - International Conference on Data Engineering
SP - 490
EP - 501
BT - Proceedings - 21st International Conference on Data Engineering, ICDE 2005
T2 - 21st International Conference on Data Engineering, ICDE 2005
Y2 - 5 April 2005 through 8 April 2005
ER -