Title
Optimisation of language-integrated queries by query unnesting.
Abstract
Native functional-style querying extensions for programming languages (e.g., LINQ or Java 8 streams) are widely considered as declarative. However, their very limited degree of optimisation when dealing with local collection processing contradicts this statement. We show that developers constructing complex LINQ queries or combining queries expose themselves to the risk of severe performance deterioration. For an inexperienced programmer, a way of getting an appropriate query form can be too complicated. Also, a manual query transformation is justified by the need of improving performance, but achieved at the expense of reflecting an actual business goal. As a result, benefits from a declarative form and an increased level of abstraction are lost.In this paper, we claim that moving of selected methods for automated optimisation elaborated for declarative query languages to the level of imperative programming languages is possible and desired. Our approach is based on the assumption that programmer is able distinguish whether a language-integrated query is intentionally used to introduce some side-effects or its sole purpose is to only query the data. We propose two optimisation procedures through query unnesting designed to avoid unnecessary multiple calculations in collection-processing constructs based on higher-order functions. We have implemented and verified this idea as a simple proof-of-concept LINQ optimiser library.
Year
DOI
Venue
2017
10.1016/j.cl.2016.09.002
Computer Languages, Systems & Structures
Keywords
Field
DocType
Program optimisation,Programming languages,Term rewriting,Declarative programming,Higher-order functions,LINQ,Query decorrelation
Query optimization,Query language,Programming language,Query expansion,Language Integrated Query,Computer science,Sargable,Web query classification,Imperative programming,Theoretical computer science,Declarative programming
Journal
Volume
Issue
ISSN
47
P2
1477-8424
Citations 
PageRank 
References 
0
0.34
17
Authors
2
Name
Order
Citations
PageRank
Tomasz Kowalski112424.06
Radoslaw Adamus2419.81