arXiv:2608.27616cs.DSAug 2026

Manuscript Offprint

arXiv:2608.27616

Diva++: Dynamic Range Filtering over Hard Workloads

Navid Eslami, Ioana O. Bercea, Niv Dayan

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

ABSTRACT

Range filters are compact probabilistic data structures that answer approximate range emptiness queries. They are used in many domains, e.g., in key-value stores, to quickly rule out the existence of keys in a given query range and avoid searching for them in storage. However, all existing range filters exhibit at least one of three shortcomings: (1) they do not provide any false positive rate or performance guarantees, (2) they do not support variable-length keys and query ranges, and (3) they do not allow dynamic updates.

We introduce Diva, the first range filter to address all the above challenges simultaneously. Diva learns the dataset's distribution by sampling keys and storing them in a cache-efficient trie. It compresses keys in-between samples by removing their longest common prefix and truncating their suffixes while leaving enough bits in the middle (i.e., an infix) to differentiate the keys in sorted order. It stores infixes in constant-time dynamic data blocks, which it splits to handle insertions and expansions. It processes a range query by traversing the trie and checking for the inclusion of infixes in the target query range.

We mathematically prove that Diva provides the best possible trade-off between memory and false positive rate on many common real-world data distributions. We extend these benefits to a wider range of real-world workloads by introducing Diva++, an enhanced Diva variant. Diva++ saves memory by removing redundancies among infixes using order-preserving entropy encoding. It then removes any remaining identical infixes and uses the freed space to store more bits of the original keys within compact binary tries.

We compare Diva and Diva++ to all prior range filters, and show that they achieve a false positive rate on par with the state of the art on real-world datasets while supporting dynamicity and variable-length queries and keys.

PVLDB Reference Format:

Navid Eslami, Ioana O. Bercea, and Niv Dayan. Diva++: Dynamic Range Filtering over Hard Workloads. PVLDB, 18(11): 3923 - 3936, 2025. doi:10.14778/3749646.3749664

PVLDB Artifact Availability:

The source code, data, and/or other artifacts have been made available at https://github.com/n3slami/Diva.git.

1 INTRODUCTION

What is a Filter? A filter is a memory-efficient probabilistic data structure that answers whether a query key exists in a given set. Its compactness allows it to fit in a higher level of the memory hierarchy than the set it represents, making it fast to query. A filter never returns a false negative but may return a false positive with a probability called the false positive rate (FPR) that depends on its memory footprint. Due to these qualities, filters are used in many applications to avoid redundant disk reads [35] and network hops [20] when a query happens to target a nonexistent key.

Range Filters and Applications. Traditional filters answer membership queries for a single key. In contrast, a range filter accepts two keys as the end-points of a range and determines if at least one key in the set is in-between them. As with a traditional filter, a range filter does not return false negatives but may return false positives. Range filters are used in many domains, especially in the context of LSM-Trees [74], to avoid accessing files that do not contain any keys within a range predicate, significantly boosting performance [3, 22, 38, 58, 65, 73, 85, 91]. They also aid in preventing redundant I/Os to SQL tables [3] and B-Tree indices [38], and they have potential applications in social web analytics [28] and replication in distributed key-value stores [82].

Range Filtering Goals. The ideal general-purpose range filter must simultaneously support (G1) the lowest possible FPR under a stringent memory budget, (G2) range queries of any length, (G3) variable-length keys, (G4) dynamic modification operations such as insertions, deletions, expansions, and contractions, and the best possible (G5) query and (G6) construction performance.

Design Contentions. Every existing range filter only fulfills a subset of these goals [3, 22, 23, 29, 38, 40, 58, 65, 73, 85, 87, 91]. In fact, almost none of the existing ones attain (G3) or (G4) [22, 29, 40, 58, 65, 73, 85, 87]. Moreover, Goswami et al. have proven an information-theoretic lower bound on the memory footprint of range filters [47], stating that it is impossible for any range filter to achieve (G1) and (G2) at the same time. However, this lower bound only holds for worst-case workloads, meaning that it may still be possible to achieve (G1) and (G2) for “common” workloads. As such, we pose the following research question: Is it possible to design a range filter that simultaneously fulfills all six goals for common workloads? This paper presents an affirmative answer.

Core Contribution: Diva. We introduce Diva, the first range filter to support dynamic operations, variable-length queries and keys, and high performance, all at the same time. Diva learns the dataset's distribution by sampling keys and storing them in a cache-efficient sample trie (S-Trie). For all keys in-between two samples of the S-Trie, Diva removes the longest common prefix. It also truncates their suffixes while keeping enough bits in the middle of each key (i.e., an infix) to differentiate them in most cases, thus achieving (G1). At the same time, the S-Trie separates dense and

This work is licensed under the Creative Commons BY-NC-ND 4.0 International License. Visit https://creativecommons.org/licenses/by-nc-nd/4.0/ to view a copy of this license. For any use beyond those covered by this license, obtain permission by emailing info@vldb.org. Copyright is held by the owner/author(s). Publication rights licensed to the VLDB Endowment.

Proceedings of the VLDB Endowment, Vol. 18, No. 11 ISSN 2150-8097. doi:10.14778/3749646.3749664

Table 1: Definitions of terms and symbols.

SymbolDefinition
q=[ql,qr]q=\left\lbrack q_{l},q_{r}\right\rbrackAn inclusive query range.
ϵ\epsilonTarget FPR, i.e., probability of a false positive.
LLAverage key length.
(a)2(a)_{2}Binary value represented by aa.
S-TrieThe trie storing a sample of the dataset.
TTNumber of keys between two samples.
msharedim_{\text{shared}}^{i}Length of the longest common prefix of the ii-th and (i+1)(i+1)-th samples, in bits.
minfixm_{\text{infix}}Length of the infixes.
mredundantim_{\text{redundant}}^{i}Number of redundant bits corresponding to the ii-th and (i+1)(i+1)-th samples.
D-TrieA binary trie differentiating keys with identical infixes.
α\alphaLoad factor of the Infix Stores.
xqx_{q}Quotient of the infix xx.
xrx_{r}Remainder of the infix xx.

sparse regions of the key space. This allows for handling short range queries over densely populated regions and long range queries over sparse regions, thus meeting (G2). By discretizing all keys into fixed-length infixes without the use of hashing, Diva achieves (G3). This discretization also allows for storing the infixes of adjacent groups of keys within a constant time data structure called an Infix Store, fulfilling (G5). As Diva derives infixes without hashing and stores them in the original sorted order of the keys, it does a single efficient sequential pass over the dataset during construction, making it the fastest range filter to construct. It therefore attains (G6). Diva handles dynamic updates by splitting Infix Stores, thereby meeting (G4).

As described above, Diva learns many data distributions common in practice using its S-Trie. Nevertheless, we observe that the string data present in certain applications (e.g., emails or URLs) follow “jagged” distributions that cannot be learned with the S-Trie alone. Such distributions introduce redundancies among Diva’s infixes, making them less likely to differentiate the keys from a range query’s endpoints and increasing the FPR.

To support such distributions, we introduce Diva++, an enhanced variant of Diva. Diva++ achieves this by eliminating redundancies among infixes using two complementary techniques: (1) It applies order-preserving entropy encoding to the input keys. Doing so removes bits common among adjacent keys and “flattens” the data distribution, thus allowing more of each key to be included in its infix and increasing the likelihood of infixes being differentiable. (2) For infixes that remain identical, Diva++ avoids storing redundant copies of them and instead uses their slots to fully differentiate their keys by encoding more of their truncated, less significant bits. In particular, it achieves this by storing a binary data trie (D-Trie) that encodes just enough bits from each key to differentiate it from the rest.

Additional Contributions.

  • We quantify the necessary conditions on the data distribution for Diva and Diva++ to achieve a low FPR and memory footprint while supporting variable-length range queries.

Table 2: Diva is the first range filter to simultaneously support variable-length queries and keys, as well as dynamicity.

FilterRobust FPR (G1)Semi-Robust FPR (G1)Var-Len. Queries (G2)Var-Len. Keys (G3)Dynamic (G4)
SuRF✓✓
Rosetta✓✓
REncoder
bloomRF
Proteus
SNARF✓✓
Oasis+✓✓
Grafite✓✓
Memento✓✓✓
Aeris✓✓✓
Diva✓✓✓✓
Diva++✓✓✓✓
  • For Diva++, we design a novel binary trie encoding (BITR), which jointly encodes both the topology and edge labels of a trie in optimal space—less than previous approaches.

  • We mathematically prove the low FPR and high performance properties of our range filter designs.

  • By proving several memory footprint lower bounds, we show that it is impossible to extend Diva (and more generally, any filter with “common-case” guarantees) to support stronger FPR guarantees at the same memory footprint.

  • We empirically evaluate Diva and Diva++ against other range filters in static and dynamic settings. We also conduct end-to-end experiments on top of WiredTiger [71], a popular B-Tree-based key-value store.

References (43)