Lune

VLDB2023顶会

High-Performance Row Pattern Recognition Using Joins

Erkang Zhu, Silu Huang, Surajit Chaudhuri

摘要

The SQL standard introduced MATCH_RECOGNIZE in 2016 for row pattern recognition. Since then, MATCH_RECOGNIZE has been supported by several leading relation systems, they implemented this function using Non-Deterministic Finite Automaton (NFA). While NFA is suitable for pattern recognition in streaming scenarios, the current uses of NFA by the relational systems for historical data analysis scenarios overlook important optimization opportunities. We propose a new approach to use Join to speed up row pattern recognition in historical analysis scenarios for relational systems. Implemented as a logical plan rewrite rule, the new approach first filters the input relation to MATCH_RECOGNIZE using Joins constructed based on a subset of symbols taken from the PATTERN expression, then run the NFA-based MATCH_RECOGNIZE on the filtered rows, reducing the net cost. The rule also includes a specialized cardinality model for the Joins and a cost model for the NFA-based MATCH_RECOGNIZE operator for choosing an appropriate symbol set. The rewrite rule is applicable when the query pattern's definition is self-contained and either the input table has no duplicates or there is a window condition. Applying the rewrite rule to a query benchmark with 1,800 queries spanning over 6 patterns and 3 pattern definitions, we observed median speedups of 5.4X on Trino (v373 with ORC files on Hive), 57.5X on SQL Server (2019) using column store and 41.6X on row store.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • ACER: Accelerating Complex Event Recognition via Two-Phase Filtering under Range Bitmap-Based Indexes 引用了 Index-Accelerated Pattern Matching in Event Stores
  • SHARP: Shared State Reduction for Efficient Matching of Sequential Patterns 引用了 Index-Accelerated Pattern Matching in Event Stores
  • A Scalable and Generic Approach to Range Joins 引用了 Near-Optimal Distributed Band-Joins through Recursive Partitioning
  • Complex Event Recognition with Symbolic Register Transducers 引用了 Index-Accelerated Pattern Matching in Event Stores
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper4

  1. Complex Event Recognition with Symbolic Register TransducersElias Alevizos, Alexander Artikis, Georgios PaliourasVLDB 2024 · 6 次引用
  2. LLMLog: Advanced Log Template Generation via LLM-driven Multi-Round AnnotationFei Teng, Haoyang Li, Lei ChenVLDB 2025 · 2 次引用
  3. ACER: Accelerating Complex Event Recognition via Two-Phase Filtering under Range Bitmap-Based IndexesShizhe Liu, Haipeng Dai, Shaoxu Song, Meng Li 等KDD 2024 · 2 次引用
  4. SHARP: Shared State Reduction for Efficient Matching of Sequential PatternsCong Yu, Tuo Shi, Matthias Weidlich, Bo ZhaoVLDB 2026

它引用的 Paper4

  1. Adopting Worst-Case Optimal Joins in Relational Database SystemsMichael J. Freitag, Maximilian Bandle, Tobias Schmidt, Alfons Kemper 等VLDB 2020 · 79 次引用
  2. Index-Accelerated Pattern Matching in Event StoresMichael Körber, Nikolaus Glombiewski, Bernhard SeegerSIGMOD 2021 · 9 次引用
  3. Near-Optimal Distributed Band-Joins through Recursive PartitioningRundong Li, Wolfgang Gatterbauer, Mirek RiedewaldSIGMOD 2020 · 8 次引用
  4. A Scalable and Generic Approach to Range JoinsMaximilian Reif, Thomas NeumannVLDB 2022 · 6 次引用

相关 Paper

  1. T-Rex: Optimizing Pattern Search on Time SeriesSilu Huang, Erkang Zhu, Surajit Chaudhuri, Leonhard SpiegelbergSIGMOD 2023 · 16 次引用
  2. WeTune: Automatic Discovery and Verification of Query Rewrite RulesZhaoguo Wang, Zhou Zhou, Yicun Yang, Haoran Ding 等SIGMOD 2022 · 35 次引用
  3. Window Function Optimization: Co-Evaluation and Other TechniquesDaniel Lindner, Felix Naumann, Alberto LernerVLDB 2026
  4. PLAQUE: Automated Predicate Learning at Query TimeYiming Lin, Sharad MehrotraSIGMOD 2024 · 2 次引用
  5. Towards a Converged Relational-Graph Optimization FrameworkYunkai Lou, Longbin Lai, Bingqing Lyu, Yufan Yang 等SIGMOD 2025 · 4 次引用
黄昏的海面,两侧是细线勾勒的悬崖