prefix-bloom-filter · shipping · also Prefix membership filter

Prefix Bloom filter

A Bloom filter built over extracted key prefixes rather than only whole keys, allowing negative membership tests for those represented prefixes.

A present prefix can belong to an absent full key; that is not a false positive for prefix membership. A single negative prefix test cannot prove an interval crossing other prefixes empty. The extractor needs a comparator under which keys that share a prefix sit together in the total order, otherwise a correct negative can still hide a matching key. [1]

RocksDB documents total_order_seek as bypassing prefix filtering where supported. Its adaptive mode aims to preserve total-order results, but v9.7.3 documents a short-key omission when the upper bound uses a different prefix. Do not treat that intent as an unconditional guarantee. [4] Manual prefix mode returns undefined results outside the prefix without an error. A file whose stored extractor name differs from the current one is generally read without its prefix filter. [1]

Prefix filters help only queries whose prefix is known in advance. A range-filter evaluation on 128-bit keys made of a 64-bit timestamp and a 64-bit sensor ID left them out, because arbitrary integer ranges had no predetermined prefixes and absent keys sharing a prefix with a present key always pass. [3]

Relations

related
Bloom filter, Prefix extractor, Succinct range filter, Sorted string table, SlimDB, TABLEFS, Prefix siphoning

Advantages

  • Short iterator queries confined to one prefix can skip sorted runs that hold no entry for it, saving I/O requests and block decompression. [1]

Limitations

  • Adaptive mode supports only fixed and capped extractors, needs comparator support for an immediate-successor test and spends extra CPU deciding whether each file qualifies. [1]

Citations

  1. RocksDB project. Prefix Seek: comparator compatibility, iterator modes and extractor changes. (accessed 2026-10-23)
  2. Zhang, Lim, Leis, Andersen, Kaminsky, Keeton and Pavlo. SuRF: Practical Range Query Filtering with Fast Succinct Tries. SIGMOD 2018, sections 1, 6 and 7. (accessed 2026-10-23)
  3. RocksDB v9.7.3 options.h: ReadOptions total_order_seek and auto_prefix_mode short-key BUG. (accessed 2026-11-14)

Further reading

  1. Hesela: prefix order counterexamples and exact-set checks (accessed 2026-10-20)
Sources & caveats
  • prefix-guide re-read 2026-10-23 for comparator compatibility, total-order and adaptive modes, manual-mode misuse and extractor changes.
  • surf read 2026-10-23, sections 1, 6 and 7, for the 128-bit key layout and the reasons prefix filters were excluded from the evaluation.
  • The sstable entry links here because prefix filters are stored per table file and are skipped for files built with a different extractor.
  • A companion analysis on prefix order counterexamples is listed but not used in prose.
  • 2026-11-14: replaced the wiki-derived unconditional adaptive-mode claim with the versioned API caveat; no claim about uninspected newer releases.

JSON: /data/terms/prefix-bloom-filter.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Prefix Bloom filter. Hesela. 2026-12-02. https://hesela.dev/terms/prefix-bloom-filter/