DocumentCode
140832
Title
Decorrelation of user defined function invocations in queries
Author
Simhadri, Varun ; Ramachandra, Karthik ; Chaitanya, Arun ; Guravannavar, Ravindra ; Sudarshan, S.
Author_Institution
IIT Hyderabad, Hyderabad, India
fYear
2014
fDate
March 31 2014-April 4 2014
Firstpage
532
Lastpage
543
Abstract
Queries containing user-defined functions (UDFs) are widely used, since they allow queries to be written using a mix of imperative language constructs and SQL, thereby increasing the expressive power of SQL; further, they encourage modularity, and make queries easier to understand. However, not much attention has been paid to their optimization, except for simple UDFs without imperative constructs. Queries invoking UDFs with imperative constructs are executed using iterative invocation of the UDFs, leading to poor performance, especially if the UDF contains queries. Such poor execution has been a major deterrent to the wider usage of complex UDFs. In this paper we present a novel technique to decorrelate UDFs containing imperative constructs, allowing set-oriented execution of queries that invoke UDFs. Our technique allows imperative execution to be modeled using the Apply construct used earlier to model correlated subqueries, and enables transformation rules to be applied subsequently to decorrelate (or inline) UDF bodies. Subquery decorrelation was critical to the wide use of subqueries; our work brings the same benefits to queries that invoke complex UDFs. We have applied our techniques to UDFs running on two commercial database systems, and present results showing up to orders of magnitude improvement.
Keywords
database management systems; query processing; Apply construct; SQL; Structured Query Language; UDF; commercial database systems; imperative language constructs; query processing; set-oriented query execution; subquery decorrelation; user defined function invocations; Context; Database systems; Decorrelation; Gold; Optimization; Platinum; Standards;
fLanguage
English
Publisher
ieee
Conference_Titel
Data Engineering (ICDE), 2014 IEEE 30th International Conference on
Conference_Location
Chicago, IL
Type
conf
DOI
10.1109/ICDE.2014.6816679
Filename
6816679
Link To Document