paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Direct Access for Answers to Conjunctive Queries with Aggregation

带聚合的合取查询答案的直接访问
LMCS vol.Volume 22, Issue 22026匹配度 1/10 · 该论文研究数据库合取查询与聚合在注解数据库上的细粒度复杂度和字典序直接访问,属于数据库理论/逻辑与自动机方向,与用户关注的静态分析、程序分析、浮点/贝叶斯分析及 LLM/Agent 交叉均无直接关联。虽然涉及形式化理论,但不属于用户研究画像的核心或边缘方向。引用 15 inbox
Idan Eldar, Nofar Carmeli, Benny Kimelfeld
crossref: 2026-09-10

AI 速览

一句话:研究带分组聚合的合取查询在注解数据库上的细粒度复杂度,给出答案字典序直接访问的易处理条件。

论文研究带分组与聚合的合取查询的细粒度复杂度。min、max、count、sum 等聚合可转化为交换半环注解数据库上的合取查询。目标是 loglinear 时间构造数据结构,以对数时间按给定字典序直接访问答案;因答案数可能远超输入,结构需紧凑表示答案空间。已有工作给出无聚合无注解下的易处理条件,并对无自连接查询证明必要性。本文证明当注解不参与字典序时这些结果仍适用于注解数据库;针对无法有效半环表示的 count-distinct 建立相应条件;并分析聚合值与注解值进入序,以及加法幂等半环等情形对复杂度的影响。

问题
带分组与聚合的合取查询答案可能极多,需在细粒度复杂度视角下判断能否用紧凑数据结构支持按给定字典序的直接访问。
方法
将聚合编码为交换半环注解数据库上的合取查询,沿用并扩展既有易处理条件,针对 count-distinct 等无法有效半环表示的情形单独分析,并考察序中包含聚合/注解值及特殊半环的影响。
评估
通过细粒度复杂度理论证明建立充分条件及在无自连接等假设下的必要性,并分析若干聚合与半环变体。
原文摘要(Abstract)

We study the fine-grained complexity of conjunctive queries with grouping and aggregation. For common aggregate functions (e.g., min, max, count, sum), such a query can be phrased as an ordinary conjunctive query over a database annotated with a suitable commutative semiring. We investigate the ability to evaluate such queries by constructing in loglinear time a data structure that provides logarithmic-time direct access to the answers ordered by a given lexicographic order. This task is nontrivial since the number of answers might be larger than loglinear in the size of the input, so the data structure needs to provide a compact representation of the space of answers. In the absence of aggregation and annotation, past research established a sufficient tractability condition on queries and orders. For queries without self-joins, this condition is not just sufficient, but also necessary (under conventional lower-bound assumptions in fine-grained complexity). We show that all past results continue to hold for annotated databases, assuming that the annotation itself does not participate in the lexicographic order. Yet, past algorithms do not apply to the count-distinct aggregation, which has no efficient representation as a commutative semiring; for this aggregation, we establish the corresponding tractability condition. We then show how the complexity of the problem changes when we include the aggregate and annotation value in the order. We also study the impact of having all relations but one annotated by the multiplicative identity (one), as happens when we translate aggregate queries into semiring annotations, and having a semiring with an idempotent addition, such as the case of min, max, and count-distinct over a logarithmic-size domain.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@article{abs-2303-05327,
  title = {Direct Access for Answers to Conjunctive Queries with Aggregation},
  author = {Idan Eldar and Nofar Carmeli and Benny Kimelfeld},
  journal = {Logical Methods in Computer Science},
  volume = {Volume 22, Issue 2},
  year = {2026},
  doi = {10.46298/lmcs-22(2:9)2026}
}