Benchmarking Learned and LSM Indexes for Data Sortedness
Open Access
- 9 June 2024
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 16-22
Abstract
Database systems use indexes on frequently accessed attributes to accelerate query and transaction processing. This requires paying the cost of maintaining and updating those indexes, which can be thought of as the process of adding structure (e.g., sort) to an otherwise unstructured data collection. The indexing cost is redundant when data arrives pre-sorted, even if only up to some degree. While recent work has studied how classical indexes like B+-trees cannot fully exploit the near-sortedness during ingestion, there is a lack of this exploration on other index designs like read-optimized learned indexes or write-optimized LSM-trees. In this paper, we bridge this gap by conducting the first-ever study on the behavior of learned indexes and LSM-trees when varying the data sortedness in an ingestion workload. Specifically, we build on prior work on benchmarking data sortedness on B+-trees and we expand the scope to benchmark: (i) ALEX and LIPP, which are updatable learned index designs; and (ii) the LSM-tree engine offered by RocksDB. We present our evaluation framework and detail key insights on the performance of the index designs when varying data sortedness. Our observations indicate that learned indexes exhibit unpredictable performance when ingesting differently sorted data, while LSM-trees can benefit from sortedness-aware optimizations. We highlight the potential headroom for improvement and lay the groundwork for further research in this domain.Keywords
This publication has 23 references indexed in Scilit:
- Indexing for Near-Sorted Data2023
- ALEX: An Updatable Adaptive Learned Index2020
- Key-Value Storage Engines2020
- The Case for Learned Index Structures2018
- FASTER2018
- The Bw-Tree: A B-tree for new hardware platforms2013
- Detecting and exploiting near-sortedness for efficient relational query evaluation2011
- The log-structured merge-tree (LSM-tree)Acta Informatica, 1996
- On partitions and presortedness of sequencesActa Informatica, 1992
- Measures of Presortedness and Optimal Sorting AlgorithmsIEEE Transactions on Computers, 1985