We study full acyclic join queries with general join predicates that involve conjunctions and disjunctions of inequality. Specifically, we provide the first non-trivial algorithms for the problem of ranked enumeration where the query results are returned incrementally in an order dictated by a given ranking function. Our approach offers strong data-complexity guarantees in the standard RAM model of computation that are surprisingly close to those of equi-joins. Given an acyclic inequality join between tables of size n , it returns the join answers in order and guarantees that for every value of k, the k top-ranked answers are returned in O(n polylog n + k log k) time . This matches  the best-known guarantee for equi-joins up to a polylogarithmic factor . The key ingredient is an \mathcal{O}(n \operatorname{polylog} n)-size factorized representation of all query results that is constructed in a preprocessing step . As a side benefit, our techniques are also applicable to the easier task of unranked enumeration ( i.e., without an output ordering) where we are able to return k join results in \mathcal{O}(n \operatorname{polylog} n + k). This guarantee is asymptotically superior to any known alternative for large values of k. In an experimental study, we show that our ranked enumeration approach is not only theoretically interesting, but also fast and memory-efficient in practice.
We study full acyclic join queries with general join predicates that involve conjunctions and disjunctions of inequalities, focusing on ranked enumeration where the answers are returned incrementally in an order dictated by a given ranking function. Our approach offers strong time and space complexity guarantees in the standard RAM model of computation , getting surprisingly close to those of equi-joins. With n denoting the number of tuples in the database, we guarantee that for every value of k, the k top-ranked answers are returned in O(n polylog n + k log k) time and \mathcal{O n + k) space. This is within a polylogarithmic factor of the best-known guarantee for equi-joins and even \mathcal{O . The key ingredient is an \mathcal{O}(n \operatorname{polylog} n)-size factorized representation of the query output, which is constructed on-the-fly for a given query and database . As a side benefit, our techniques are also applicable to unranked enumeration ( where answers can be returned in any order) for joins with inequalities, returning k answers in \mathcal{O}(n \operatorname{polylog} n + k). This guarantee improves over the state of the art for large values of k. In an experimental study, we show that our ranked-enumeration approach is not only theoretically interesting, but also fast and memory-efficient in practice.
R
inequality. Specifically, we provide the first non-trivial algorithms for the problem of
inequalities, focusing on
R
query results
answers
R
data-complexity
time and space complexity
R
that are
, getting
R
Given an acyclic inequality join between tables of size n , it returns the join answers in order and guarantees
With n denoting the number of tuples in the database, we guarantee
R
. This matches
and \mathcal{O
A
n + k) space. This is within a polylogarithmic factor of
R
up to a polylogarithmic factor
and even \mathcal{O
R
all query results that is constructed in a preprocessing step
the query output, which is constructed on-the-fly for a given query and database
D
the easier task of
R
i.e., without an output ordering) where we are able to return k join results
where answers can be returned in any order) for joins with inequalities, returning k answers
R
is asymptotically superior to any known alternative
improves over the state of the art
R
ranked enumeration
ranked-enumeration