Query Optimization
We develop techniques for optimizing query evaluation over databases
In this research, we aim to develop techniques for optimizing query evaluation over databases of various types, from traditional relational models to ones entailed in text analytics. Our focus is on “compilation” techniques that translate queries into different formalisms that are associated with algorithms and complexity guarantees.
People
- Prof. Benny Kimelfeld
- Dean Light
- Oren Kalinsky alumnus
- Liat Peterfreund alumnus
- Nofar Carmeli alumnus
- Moshe Sebag alumnus
Publications
-
A Formal Language Perspective on Factorized Representations
ICDT 2025
-
Direct Access for Answers to Conjunctive Queries with Aggregation
ICDT 2024
-
Understanding Bulk-Bitwise Processing In-Memory Through Database Analytics
IEEE Transactions on Emerging Topics in Computing 12(1): 7-22 (2024)
-
Exploration of Knowledge Graphs via Online Aggregation
ICDE 2022: 2695-2708
-
Tractable Orders for Direct Access to Ranked Answers of Conjunctive Queries
PODS 2021: 325-341
-
Answering (Unions of) Conjunctive Queries using Random Access and Random-Order Enumeration
PODS 2020: 393-409
-
On the Enumeration Complexity of Unions of Conjunctive Queries
PODS 2019: 134-148
-
Enumeration Complexity of Conjunctive Queries with Functional Dependencies
ICDT 2018: 11:1-11:17
Query Optimization Enumeration Algorithms
Abstract
We study the complexity of enumerating the answers of Conjunctive Queries (CQs) in the presence of Functional Dependencies (FDs). Our focus is on the ability to list output tuples with a constant delay in between, following a linear-time preprocessing. A known dichotomy classifies the acyclic self-join-free CQs into those that admit such enumeration, and those that do not. However, this classification no longer holds in the common case where the database exhibits dependencies among attributes. That is, some queries that are classified as hard are in fact tractable if dependencies are accounted for. We establish a generalization of the dichotomy to accommodate FDs; hence, our classification determines which combination of a CQ and a set of FDs admits constant-delay enumeration with a linear-time preprocessing. In addition, we generalize a hardness result for cyclic CQs to accommodate a common type of FDs. Further conclusions of our development include a dichotomy for enumeration with linear delay, and a dichotomy for CQs with disequalities. Finally, we show that all our results apply to the known class of “cardinality dependencies” that generalize FDs (e.g., by stating an upper bound on the number of genres per movies, or friends per person).
-
Joining Extractions of Regular Expressions
PODS 2018: 137-149
Text Analysis Query Optimization Enumeration Algorithms
Abstract
Regular expressions with capture variables, also known as “regex formulas,” extract relations of spans (interval positions) from text. These relations can be further manipulated via Relational Algebra as studied in the context of document spanners, Fagin et al.’s formal framework for information extraction. We investigate the complexity of querying text by Conjunctive Queries (CQs) and Unions of CQs (UCQs) on top of regex formulas. We show that the lower bounds (NPcompleteness and W[1]-hardness) from the relational world also hold in our setting; in particular, hardness hits already single-character text! Yet, the upper bounds from the relational world do not carry over. Unlike the relational world, acyclic CQs, and even gamma-acyclic CQs, are hard to compute. The source of hardness is that it may be intractable to instantiate the relation defined by a regex formula, simply because it has an exponential number of tuples. Yet, we are able to establish general upper bounds. In particular, UCQs can be evaluated with polynomial delay, provided that every CQ has a bounded number of atoms (while unions and projection can be arbitrary). Furthermore, UCQ evaluation is solvable with FPT (Fixed-Parameter Tractable) delay when the parameter is the size of the UCQ.
-
Flexible Caching in Trie Joins
EDBT 2017: 282-293
Abstract
Traditional algorithms for multiway join computation are based on rewriting the order of joins and combining results of intermediate subqueries. Recently, several approaches have been proposed for algorithms that are “worst-case optimal” wherein all relations are scanned simultaneously. An example is Veldhuizen’s Leapfrog Trie Join (LFTJ). An important advantage of LFTJ is its small memory footprint, due to the fact that intermediate results are full tuples that can be dumped immediately. However, since the algorithm does not store intermediate results, recurring joins must be reconstructed from the source relations, resulting in excessive memory traffic. In this paper, we address this problem by incorporating caches into LFTJ. We do so by adopting recent developments on join optimization, tying variable ordering to tree decomposition. While the traditional usage of tree decomposition computes the result for each bag in advance, our proposed approach incorporates caching directly into LFTJ and can dynamically adjust the size of the cache. Consequently, our solution balances memory usage and repeated computation, as confirmed by our experiments over SNAP datasets.