Table of Contents
Fetching ...

Fine-Grained Dichotomies for Conjunctive Queries with Minimum or Maximum

Nofar Carmeli, Nikolaos Tziavelis

TL;DR

The paper tackles the fine-grained data complexity of direct access to Conjunctive Query ($Q$) answers under $\min$- or $\\,max$-based orderings, introducing min-predicate $x \leq \min X$ and predicate-elimination techniques. It proves a dichotomy: efficient min-ranked direct access, counting, and predicate elimination occur exactly when the CQ is acyclic free-connex and there is no long chordless path between free variables involved in the min predicate; enumeration, however, enjoys a broader tractable regime. The authors present a bottom-up aggregation framework on semirings, a direct-access construction MinDA with preparation, partition-elimination, secondary DA structures, and a Min-DA array, enabling linear preprocessing and $O(\log |D|)$ access. They also establish conditional lower bounds based on Hyperclique and Seth hypotheses. This work provides both a theoretical foundation and practical methods for efficient ranked CQ answering with min predicates, informing database engine design for ranking and forecasting tasks.

Abstract

We investigate the fine-grained complexity of direct access to Conjunctive Query (CQ) answers according to their position, ordered by the minimum (or maximum) value between attributes. We further use the tools we develop to explore a wealth of related tasks. We consider the task of ranked enumeration under min/max orders, as well as tasks concerning CQs with predicates of the form x <= min X , where X is a set of variables and x is a single variable: counting, enumeration, direct access, and predicate elimination (i.e., transforming the pair of query and database to an equivalent pair without min-predicates). For each task, we establish a complete dichotomy for self-join-free CQs, precisely identifying the cases that are solvable in near-ideal time, i.e., (quasi)linear preprocessing time followed by constant or logarithmic time per output.

Fine-Grained Dichotomies for Conjunctive Queries with Minimum or Maximum

TL;DR

The paper tackles the fine-grained data complexity of direct access to Conjunctive Query () answers under - or -based orderings, introducing min-predicate and predicate-elimination techniques. It proves a dichotomy: efficient min-ranked direct access, counting, and predicate elimination occur exactly when the CQ is acyclic free-connex and there is no long chordless path between free variables involved in the min predicate; enumeration, however, enjoys a broader tractable regime. The authors present a bottom-up aggregation framework on semirings, a direct-access construction MinDA with preparation, partition-elimination, secondary DA structures, and a Min-DA array, enabling linear preprocessing and access. They also establish conditional lower bounds based on Hyperclique and Seth hypotheses. This work provides both a theoretical foundation and practical methods for efficient ranked CQ answering with min predicates, informing database engine design for ranking and forecasting tasks.

Abstract

We investigate the fine-grained complexity of direct access to Conjunctive Query (CQ) answers according to their position, ordered by the minimum (or maximum) value between attributes. We further use the tools we develop to explore a wealth of related tasks. We consider the task of ranked enumeration under min/max orders, as well as tasks concerning CQs with predicates of the form x <= min X , where X is a set of variables and x is a single variable: counting, enumeration, direct access, and predicate elimination (i.e., transforming the pair of query and database to an equivalent pair without min-predicates). For each task, we establish a complete dichotomy for self-join-free CQs, precisely identifying the cases that are solvable in near-ideal time, i.e., (quasi)linear preprocessing time followed by constant or logarithmic time per output.
Paper Structure (26 sections, 9 theorems, 2 equations, 3 figures, 1 algorithm)

This paper contains 26 sections, 9 theorems, 2 equations, 3 figures, 1 algorithm.

Key Result

theorem 1

Let $Q$ be a CQ with no self-joins and $X$ a subset of its free variables. $Q$ admits single access according to $\min{X}$ with quasilinear preprocessing time and logarithmic access time if and only if $Q$ is acyclic free-connex, assuming Hyperclique and Seth.

Figures (3)

  • Figure 1: Overview of dichotomies for query-answering tasks. All results are established in this paper, except for min-ranked single access, which follows from results on quantile queries tziavelis23quantiles, as explained in \ref{['sec:quantiles_vs_selection']}. A "bad path" is a chordless $k$-path with $k\geq 3$, which in the case of a problem with min-ranking is between two variables participating in the order, while in the case of a problem with a min-predicate $x \leq \min X$ is between $x$ if it is free and another free variable in $X$. The negative sides of all dichotomies apply only to self-join-free queries and are conditional on hardness hypotheses; see \ref{['sec:results']} for detailed statements.
  • Figure 2: \ref{['ex:elim']}: For an example join tree, partitioning $x_0 < \min \{ x_1, \ldots, x_7 \}$ into a set of partial orders and enforcing join trees. In the four resulting join trees, the common parts are shown in gray.
  • Figure 3: Example direct access for the full CQ with body $R(x_0),R(x_1,y),R(x_2,y)$ by $\min\{x_0,x_1,x_2\}$. For visualization purposes, the transformed domain values are shown with superscript (e.g., $1^{x_0}$ instead of $(1, x_0)$).

Theorems & Definitions (14)

  • theorem 1: tziavelis23quantilescarmeli23tractable
  • lemma 1
  • lemma 2
  • definition 1: Predicate Elimination
  • Remark 1: Elimination Composition
  • Remark 2: Choice of Predicate
  • corollary 1: Boolean With a Predicate
  • definition 2
  • lemma 3: tziavelis21inequalities
  • lemma 4
  • ...and 4 more