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.
翻译:本文研究了合取查询(CQ)答案按位置直接访问的细粒度复杂度,其中答案根据属性间的最小(或最大)值排序。我们进一步利用所开发的工具探索了一系列相关任务。我们考虑了最小/最大排序下的枚举排序任务,以及涉及形如 x <= min X 谓词的合取查询任务(其中 X 是变量集合,x 是单个变量):包括计数、枚举、直接访问和谓词消除(即将查询与数据库对转换为不含最小谓词的等价对)。针对每项任务,我们为无自连接合取查询建立了完整的二分法,精确识别了可在近理想时间内求解的情形,即(拟)线性预处理时间后,每个输出仅需常数或对数时间。