Lune

SIGMOD2020顶会

The Case for a Learned Sorting Algorithm

Ani Kristo, Kapil Vaidya, Ugur Çetintemel, Sanchit Misra, Tim Kraska

摘要

Sorting is one of the most fundamental algorithms in Computer Science and a common operation in databases not just for sorting query results but also as part of joins (i.e., sort-merge-join) or indexing. In this work, we introduce a new type of distribution sort that leverages a learned model of the empirical CDF of the data. Our algorithm uses a model to efficiently get an approximation of the scaled empirical CDF for each record key and map it to the corresponding position in the output array. We then apply a deterministic sorting algorithm that works well on nearly-sorted arrays (e.g., Insertion Sort) to establish a totally sorted order. We compared this algorithm against common sorting approaches and measured its performance for up to 1 billion normally-distributed double-precision keys. The results show that our approach yields an average 3.38x performance improvement over C++ STL sort, which is an optimized Quicksort hybrid, 1.49x improvement over sequential Radix Sort, and 5.54x improvement over a C++ implementation of Timsort, which is the default sorting function for Java and Python.

问 Lune

几分钟看清这篇 Paper 的位置,不用再花一下午。

Lune 能读引用它和与它最相关的顶会 Paper,讲清它说了什么、后来怎样、哪里站不住,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

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

可以从这些问题问起

Lune 可以查阅

摘要 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper12

  1. Are We Ready For Learned Cardinality Estimation?Xiaoying Wang, Changbo Qu, Weiyuan Wu, Jiannan Wang 等VLDB 2021 · 156 次引用
  2. SNARF: A Learning-Enhanced Range FilterKapil Vaidya, Tim Kraska, Subarna Chatterjee, Eric R. Knorr 等VLDB 2022 · 39 次引用
  3. Sorting with PredictionsXingjian Bai, Christian CoesterNeurIPS 2023 · 29 次引用
  4. The Case for Learned In-Memory JoinsIbrahim Sabek, Tim KraskaVLDB 2023 · 27 次引用
  5. LSched: A Workload-Aware Learned Query Scheduler for Analytical Database SystemsIbrahim Sabek, Tenzin Samten Ukyab, Tim KraskaSIGMOD 2022 · 25 次引用

相关 Paper

  1. Theoretical Analysis of Learned Database Operations under Distribution Shift through Distribution LearnabilitySepanta Zeighami, Cyrus ShahabiICML 2024 · 5 次引用
  2. Can Learned Models Replace Hash Functions?Ibrahim Sabek, Kapil Vaidya, Dominik Horn, Andreas Kipf 等VLDB 2023 · 29 次引用
  3. HIRE: A Hybrid Learned Index for Robust and Efficient Performance under Mixed WorkloadsXinyi Zhang, Liang Liang, Anastasia Ailamaki, Jianliang XuSIGMOD 2026 · 2 次引用
  4. These Rows Are Made for Sorting and That's Just What We'll DoLaurens Kuiper, Hannes MühleisenICDE 2023 · 6 次引用
  5. SOLAR: Scalable Distributed Spatial Joins Through Learning-Based OptimizationYongyi Liu, Ahmed Abdelmaguid, Ahmed R. Mahmood, Amr Magdy 等ICDE 2026
黄昏的海面,两侧是细线勾勒的悬崖