Skip to main content
QUICK REVIEW

[Paper Review] Bounding the Last Mile: Efficient Learned String Indexing

Benjamin Spector, Andreas Kipf|arXiv (Cornell University)|Nov 29, 2021
Algorithms and Data CompressionComputer Science10 references7 citations
TL;DR

This paper introduces RadixStringSpline (RSS), a learned string index that uses error-bounded splines over HOPE-compressed string prefixes to enable fast, memory-efficient primary indexing. By bounding prediction error, RSS replaces costly exponential last-mile searches with efficient binary search, achieving 7–70× lower memory usage than ART and HOT while matching or exceeding their speed on real-world datasets.

ABSTRACT

We introduce the RadixStringSpline (RSS) learned index structure for efficiently indexing strings. RSS is a tree of radix splines each indexing a fixed number of bytes. RSS approaches or exceeds the performance of traditional string indexes while using 7-70$ imes$ less memory. RSS achieves this by using the minimal string prefix to sufficiently distinguish the data unlike most learned approaches which index the entire string. Additionally, the bounded-error nature of RSS accelerates the last mile search and also enables a memory-efficient hash-table lookup accelerator. We benchmark RSS on several real-world string datasets against ART and HOT. Our experiments suggest this line of research may be promising for future memory-intensive database applications.

Motivation & Objective

  • To address the high memory and slow last-mile search costs in learned string indexing for primary indexes.
  • To reduce memory usage in string indexing by leveraging prefix compression and bounded error models.
  • To accelerate last-mile search by replacing exponential search with binary search using error bounds.
  • To enable efficient equality and lower-bound lookups in memory-constrained database workloads like dictionary encoding.
  • To evaluate RSS on real-world string datasets and compare it with state-of-the-art structures like ART and HOT.

Proposed method

  • RSS organizes data as a tree of RadixSpline (RS) nodes, each indexing a fixed-length prefix (e.g., 8 bytes) of HOPE-compressed strings.
  • Each RS node uses a spline model with bounded error to predict the range of keys, enabling binary search in the last mile.
  • HOPE compression eliminates common prefixes and increases information density, reducing average string size by 1.6× on average.
  • The tree structure allows high fan-out per node due to the model’s ability to distinguish keys with minimal prefix length.
  • A hash-table accelerator is enabled by the bounded error, allowing fast equality lookups without full string comparisons.
  • The model is trained on lexicographically sorted string arrays, with predictions used to guide search within bounded intervals.

Experimental results

Research questions

  • RQ1Can a learned index structure achieve significantly lower memory usage than traditional string indexes like ART and HOT?
  • RQ2Can bounded error in learned models reduce the cost of last-mile search in string indexing?
  • RQ3How does prefix compression (via HOPE) affect the performance and memory efficiency of learned string indexes?
  • RQ4Does RSS outperform existing structures in both speed and memory consumption on real-world string workloads?
  • RQ5Can the tree-of-splines design scale efficiently across diverse string data distributions?

Key findings

  • RSS achieves 7–70× lower memory usage than ART and HOT across multiple real-world datasets, including Wiki, Twitter, Examiner, and URL.
  • On the Twitter and Wiki datasets, RSS achieves lower bound lookup times of 406 ns and 513 ns respectively, outperforming ART and HOT in speed.
  • RSS with HOPE compression (RSS+HC) reduces memory usage from 123 MB to 278.8 MB on the URL dataset, though performance remains lower due to high prefix similarity.
  • The use of bounded error enables binary search in the last mile, reducing the number of expensive string comparisons compared to exponential search.
  • RSS outperforms ART and HOT in build time, with significantly faster construction, especially beneficial for bulk-loading scenarios.
  • The performance of RSS is highly dependent on information density in early bytes; datasets with high prefix diversity (e.g., Twitter) see the greatest gains.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.