发表机构
Polytechnique Montréal(蒙特利尔高等工程学院)
机构由 AI 辅助整理,请以论文原文为准。AI 中文总结
FFX引擎首次在完全向量化下支持任意因式分解方案,通过打包因式分解向量和序列化紧凑提示,优化连接密集型分析与语义查询,减少中间结果爆炸和LLM推理成本。
AI 中文摘要
多对多连接是欺诈检测、网络分析和推荐等分析与语义工作负载的核心,这些工作负载的洞察源于实体之间的关系。此类工作负载常常遭受中间结果爆炸的困扰,中间结果有时比输入大数个数量级。因式分解表示通过利用属性间的条件独立性来更紧凑地编码中间结果,从而解决这一问题。在某些情况下,它们可以将输出规模渐近地降低到最坏情况输出规模以下。然而,在现代向量化查询处理器中采用因式分解仍然具有挑战性:因式分解表示是层次化的,而向量化执行是围绕扁平的、面向块的处理构建的。先前的方法要么依赖完全物化,要么仅支持受限的因式分解布局,牺牲了因式分解和向量化的大部分优势。我们提出了FFX,一种用于快速因式分解执行(Fast Factorized eXecution)的新型引擎。FFX是第一个在保持完全向量化的同时支持任意因式分解方案的流水线引擎。该引擎引入了打包的因式分解向量和算子,以维持缓存友好、连续的内存布局。除分析功能外,FFX还通过将因式分解的中间结果序列化为用于大型语言模型(LLM)的紧凑提示来协同优化语义算子,大幅减少令牌使用和推理成本,同时保持输出质量,在某些情况下甚至提升质量。这些贡献共同实现了对连接密集型分析查询的高效执行,包括那些增强了语义算子的查询。
英文摘要
Many-to-many joins are central to analytical and semantic workloads such as fraud detection, network analysis, and recommendation, where insights arise from relationships between entities. These workloads often suffer from an explosion of intermediate results, sometimes orders of magnitude larger than the inputs. Factorized representations address this problem by exploiting conditional independence among attributes to encode intermediates more compactly. In some cases, they can reduce the output size asymptotically below the worst-case output size. However, adopting factorization in modern vectorized query processors remains challenging: factorized representations are hierarchical, whereas vectorized execution is built around flat, block-oriented processing. Prior approaches either rely on full materialization or support only restricted factorization layouts, sacrificing much of the benefits of both factorization and vectorization. We present FFX, a novel engine for Fast Factorized eXecution. FFX is the first pipelined engine to support arbitrary factorization schemes while preserving full vectorization. The engine introduces packed factorized vectors and operators that maintain cache-friendly, contiguous layouts. Beyond analytics, FFX also co-optimizes semantic operators by serializing factorized intermediates into compact prompts for large language models (LLMs), substantially reducing token usage and inference cost while maintaining output quality and, in some cases, improving it. Together, these contributions enable efficient execution of join-heavy analytical queries, including queries augmented with semantic operators.
Journal refProceedings of the ACM on Management of Data, 4(3), Article 178, 2026
DOI:10.1145/3802055