[论文解读] Direct Access for Answers to Conjunctive Queries with Aggregation
本文建立了对带有聚集的合取查询直接访问的二分法,表明当且仅当查询的底层结构为无环且不包含破坏性三元组时,可实现对答案的线性对数时间预处理和对数时间随机访问——前提是聚集值不参与字典序排序。结果通过交换半环标注扩展至标准聚集函数(min、max、count、sum),并在对数域约束下适用于 count-distinct,当聚集值被纳入排序时,需采用更精细的可 tractability 条件。
We study the fine-grained complexity of conjunctive queries with grouping and aggregation. For some 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. Specifically, we investigate the ability to evaluate such queries by constructing in log-linear 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 log-linear in the size of the input, and so, the data structure needs to provide a compact representation of the space of answers. In the absence of aggregation and annotation, past research provides 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 is not part of the lexicographic order. On the other hand, we show infeasibility for the case of count-distinct that does not have any efficient representation as a commutative semiring. We then investigate the ability to include the aggregate and annotation outcome in the lexicographic order. Among the hardness results, standing out as tractable is the case of a semiring with an idempotent addition, such as those of min and max. Notably, this case captures also count-distinct over a logarithmic-size domain.
研究动机与目标
- 确定带有聚集的合取查询在何种条件下可通过直接访问实现线性对数时间预处理和对数时间访问。
- 将先前对纯合取查询的可 tractability 结果扩展至聚集情况,特别是针对 min、max、count 和 sum 等常见聚集函数。
- 分析将聚集值纳入答案字典序排序所带来的新复杂性。
- 研究当数据库被标注为交换半环时,直接访问的行为表现,特别是当加法运算为幂等时(如 min、max、count-distinct)。
- 建立一个处理直接访问中聚集的一般框架,通过将其约化为带半环标注的查询,并分析由此产生的查询结构。
提出的方法
- 将聚集查询表示为带半环标注数据库上的合取查询,使用交换半环来建模聚集(例如,(N, min, +) 表示 min,(N, max, +) 表示 max,(N, +, ×) 表示 sum,(N, ∨, ∧) 表示 count-distinct)。
- 引入 Rcarry-deannotation 概念,以在去除标注后隔离查询的自由变量结构,从而实现对底层查询结构的分析。
- 在假设聚集值不参与排序的前提下,将已知的纯合取查询直接访问的二分法(无环 + 无破坏性三元组)应用于去标注后的查询。
- 当聚集值被纳入字典序时,建立新的可 tractability 条件,表明此类情况显著更难,需施加更严格的结构约束。
- 使用 HYPERCLIQUE 和 SparseBMM 假设,证明非无环或含破坏性三元组的查询在相同假设下为不可 tractability,即使存在聚集。
- 通过分析 Rcarry-deannotated 查询的结构并应用细化后的二分法,将结果推广至加法为幂等的半环(如 min、max、count-distinct)。
实验结果
研究问题
- RQ1在何种条件下,带有聚集的合取查询可通过直接访问实现线性对数时间预处理和对数时间访问?
- RQ2将聚集值纳入字典序排序如何影响直接访问的可 tractability?
- RQ3能否通过半环标注将纯合取查询的可 tractability 二分法扩展至带有聚集的查询?
- RQ4使用具有幂加法的交换半环(如 min、max、count-distinct)对直接访问复杂度有何影响?
- RQ5查询结构——特别是无环性和无破坏性三元组——在涉及聚集时如何影响直接访问?
主要发现
- 对于标准聚集(min、max、count、sum),直接访问属于 ⟨loglinear, log⟩ 当且仅当查询的自由变量投影为无环且无破坏性三元组,前提是聚集值不参与排序。
- count-distinct 聚集可在同一二分法下处理,但仅当被计数属性具有对数域且在字典序末尾被视为自由变量时成立。
- 当聚集值被纳入字典序时,可 tractability 条件变得显著更严格,需采用更窄的新条件以保证效率。
- 对于加法为幂等的半环(如 min、max、count-distinct),直接访问的二分法简化为分析 Rcarry-deannotated 查询,且相同的无环性与无破坏性三元组条件依然适用。
- 在 HYPERCLIQUE 和 SparseBMM 假设下,证明了非无环或含破坏性三元组的查询不可 tractability,即使存在聚集。
- 通过先对自连接进行属性符号重命名与复制处理,可将结果推广至自连接查询,同时保持与可 tractability 相关的结构特性。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。