🤖 AI Summary
This paper investigates the fine-grained complexity of acyclic join queries without self-joins under sorting by attribute-wise minimum or maximum values, focusing on direct access, ranked enumeration, counting, full enumeration, and predicate elimination. We establish the first complete complexity dichotomy for min/max-sorted join queries, achieving near-linear preprocessing time and optimal constant- or logarithmic-delay per output tuple. Our approach introduces *min-predicate elimination*—a novel equivalence-preserving query transformation—and unifies fine-grained complexity analysis, query rewriting, and database transformations to handle min/max constraints systematically. The dichotomy applies to all acyclic join queries without self-joins, yielding tight bounds across all considered tasks. Our results provide both theoretical completeness—resolving longstanding open questions on sorted joins—and practical efficiency, enabling scalable execution of sorting-sensitive join queries in modern analytical workloads.
📝 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.