---
title: "Interpolation search for SST index blocks"
description: "RocksDB adds interpolation search for SST index blocks, which estimates the probe position from key values and needs an expected O(log log n) probes on uniformly distributed keys, versus Θ(log n) for binary search."
url: "https://swe.quest/articles/interpolation-search-for-sst-index-blocks-87e39fd0767b7895"
canonical: "https://rocksdb.org/blog/2026/05/04/interpolation-search.html"
source: "RocksDB Blog"
published: "2026-05-04"
difficulty: "hard"
kind: "Deep dive"
reading_minutes: 4
tags: ["storage-engines","algorithms","performance","databases"]
---

# Interpolation search for SST index blocks

A post on [RocksDB Blog](https://swe.quest/sources/rocksdb.md), published 2026-05-04, 4 min read, Deep dive. Original: [https://rocksdb.org/blog/2026/05/04/interpolation-search.html](https://rocksdb.org/blog/2026/05/04/interpolation-search.html)

## Summary

RocksDB adds interpolation search for SST index blocks, which estimates the probe position from key values and needs an expected O(log log n) probes on uniformly distributed keys, versus Θ(log n) for binary search. Keys are mapped to uint64 by reading the first 8 big-endian bytes after the boundary keys' common prefix, zero-padded so bytewise order is preserved. That is why the feature requires BytewiseComparator, and it falls back to binary search when keys collide. The recommended kAuto mode sets a per-block is\_uniform footer bit at write time when the coefficient of variation of restart-key gaps, computed with Welford's algorithm, falls below uniform\_cv\_threshold. This costs about 0.08% of write CPU and gave a 9.2% point-read throughput gain, but SSTs with the bit set read as corruption on RocksDB versions before 11.0.0.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Storage engines](https://swe.quest/tags/storage-engines.md) (Data & databases)
- [Algorithms](https://swe.quest/tags/algorithms.md) (Architecture & design)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)

## Prerequisites

- LSM trees and SST files ([easy posts on Storage engines](https://swe.quest/tags/storage-engines.md?difficulty=easy))
- binary search ([easy posts on Search](https://swe.quest/tags/search.md?difficulty=easy))
- RocksDB block-based tables

## Keywords

RocksDB, interpolation search, SST, BytewiseComparator, Welford's algorithm, db\_bench

## Related posts

- [FIFO KV-Ratio Compaction for BlobDB-Backed TTL Workloads](https://swe.quest/articles/fifo-kv-ratio-compaction-for-blobdb-backed-ttl-workloads-d50be1cc261543b0.md): RocksDB Blog · 2026-06-20 · Hard · 6 min read · Storage engines, Databases, Performance engineering
  RocksDB 11.0 adds a KV-ratio intra-L0 compaction picker for FIFO compaction with integrated BlobDB.
- [Range Tombstone Conversion: Faster Scans Over Long Runs of Deletes](https://swe.quest/articles/range-tombstone-conversion-faster-scans-over-long-runs-of-deletes-35ec1c2ca9bbc8b7.md): RocksDB Blog · 2026-06-22 · Hard · 8 min read · Storage engines, Performance engineering, Databases
  RocksDB 11.3.0 adds range tombstone conversion: when a read iterator walks a run of contiguous point tombstones with no live key between them, it inserts one redundant range tombstone \[first\_tombstone\_key, next\_live\_key) into the memtable at the iterator's snapshot sequence number.
- [Native Async/Coroutine Reads in RocksDB](https://swe.quest/articles/native-async-coroutine-reads-in-rocksdb-a16f6ef8c30162a7.md): RocksDB Blog · 2026-08-24 · Hard · 10 min read · Storage engines, Concurrency, C & C++, Performance engineering, Databases
  RocksDB 11.10.0 adds experimental native asynchronous Get/MultiGet APIs (callback-based GetAsync/MultiGetAsync and Folly-task-based CoroDB::CoGet/CoMultiGet) that suspend a read at the SST block-miss filesystem boundary and resume it on the same io\_uring-backed EventBase thread, so a small read executor can sustain high storage queue depth without one parked thread per read.
- [ClickHouse Release 24.11](https://swe.quest/articles/clickhouse-release-24-11-6fda281750a6cdc4.md): ClickHouse · 2024-12-06 · Medium · 6 min read · Analytics & OLAP, Query engines, SQL, Vector search, Performance engineering
  ClickHouse 24.11 makes parallel hash join the default join algorithm, building several hash tables concurrently for speed at the cost of more memory, and adds zero-copy block scattering between threads.
- [A journey to io\_uring, AIO and modern storage devices](https://swe.quest/articles/a-journey-to-io-uring-aio-and-modern-storage-devices-ea62e6880dceaf0b.md): ClickHouse · 2021-03-09 · Medium · 5 min read · Storage systems, Hardware, Performance engineering, Linux
  Single random read latency was benchmarked with pread(2) across HDD, SATA SSD, NVMe SSD and Intel Optane, at block sizes from 4 KB to 32 MB.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
