Lune

SIGMOD2021顶会

COMPASS: Online Sketch-based Query Optimization for In-Memory Databases

Yesdaulet Izenov, Asoke Datta, Florin Rusu, Jun Hyung Shin

摘要

Cost-based query optimization remains a critical task in relational databases even after decades of research and industrial development. Query optimizers rely on a large range of statistical synopses for accurate cardinality estimation. As the complexity of selections and the number of join predicates increase, two problems arise. First, statistics cannot be incrementally composed to effectively estimate the cost of the sub-plans generated in plan enumeration. Second, small errors are propagated exponentially through joins, which can lead to severely sub-optimal plans. In this paper, we introduce COMPASS, a novel query optimization paradigm for in-memory databases based on a single type of statistics---Fast-AGMS sketches. In COMPASS, query optimization and execution are intertwined. Selection predicates and sketch updates are pushed-down and evaluated online during query optimization. This allows Fast-AGMS sketches to be computed only over the relevant tuples---which enhances cardinality estimation accuracy. Plan enumeration is performed over the query join graph by incrementally composing attribute-level sketches---not by building a separate sketch for every sub-plan. We prototype COMPASS in MapD -- an open-source parallel database -- and perform extensive experiments over the complete JOB benchmark. The results prove that COMPASS generates better execution plans -- both in terms of cardinality and runtime -- compared to four other database systems. Overall, COMPASS achieves a speedup ranging from 1.35X to 11.28X in cumulative query execution time over the considered competitors.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • BitMatcher: Bit-level Counter Adjustment for Sketches 引用了 Stingy Sketch: A Sketch Framework for Accurate and Fast Frequency Estimation
  • JoinSketch: A Sketch Algorithm for Accurate and Unbiased Inner-Product Estimation 引用了 Stingy Sketch: A Sketch Framework for Accurate and Fast Frequency Estimation
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper14

  1. Stingy Sketch: A Sketch Framework for Accurate and Fast Frequency EstimationHaoyu Li, Qizhi Chen, Yixin Zhang, Tong Yang 等VLDB 2022 · 54 次引用
  2. FASTgres: Making Learned Query Optimizer Hinting EffectiveLucas Woltmann, Jerome Thiessat, Claudio Hartmann, Dirk Habich 等VLDB 2023 · 40 次引用
  3. BitMatcher: Bit-level Counter Adjustment for SketchesQilong Shi, Chengjun Jia, Wenjun Li, Zaoxing Liu 等ICDE 2024 · 22 次引用
  4. JoinSketch: A Sketch Algorithm for Accurate and Unbiased Inner-Product EstimationFeiyu Wang, Qizhi Chen, Yuanpeng Li, Tong Yang 等SIGMOD 2023 · 20 次引用
  5. CAFE: Towards Compact, Adaptive, and Fast Embedding for Large-scale Recommendation ModelsHailin Zhang, Zirui Liu, Boxuan Chen, Yikai Zhao 等SIGMOD 2024 · 15 次引用

它引用的 Paper1

  1. Deep Unsupervised Cardinality EstimationZongheng Yang, Eric Liang, Amog Kamsetty, Chenggang Wu 等VLDB 2020 · 206 次引用

相关 Paper

  1. Speeding Up End-to-end Query Execution via Learning-based Progressive Cardinality EstimationFang Wang, Xiao Yan, Man Lung Yiu, Shuai Li 等SIGMOD 2023 · 24 次引用
  2. ASM: Harmonizing Autoregressive Model, Sampling, and Multi-dimensional Statistics Merging for Cardinality EstimationKyoungmin Kim, Sangoh Lee, Injung Kim, Wook-Shin HanSIGMOD 2024 · 18 次引用
  3. Sample-based Distinct Cardinality Estimation for Multiple Attributes in Multi-Dataset QueriesMehnaz Tabassum Mahin, Michael J. Carey, Vassilis J. TsotrasVLDB 2026
  4. A Practical Approach to Groupjoin and Nested AggregatesPhilipp Fent, Thomas NeumannVLDB 2021 · 11 次引用
  5. Data-Agnostic Cardinality Learning from Imperfect WorkloadsPeizhi Wu, Rong Kang, Tieying Zhang, Jianjun Chen 等VLDB 2025 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖