Skip to content
About
Main content

What lookup structures forbid

What this article forbids

No structure gives all of these at once: constant-time point lookup, ordered range scan, cheap random update, and space near the bound. The RUM triangle is the binding form of this. The order/no-order split is a second, harder constraint: order cannot be bought afterwards for less than the cost of a sort, and a hash can never serve a range predicate at any price.

More sharply: Every structure here encodes a bet, and the loss when the bet is wrong is not proportional. It is a cliff. Spilling, full scans, degenerate range joins and useless are all the same failure: the structure's assumption about the workload was violated and there was no graceful middle.

The escapes, and what each costs

EscapeWhat it costs
Keep more than one structure (a primary index plus secondary indexes; a B-tree plus an inverted index) multiplies by the number of structures, and you get a consistency problem between them, which is how index maintenance becomes a transaction problem. In a distributed system you also choose between local (cheap writes, reads must ask every partition) and global ones (the exact opposite)
Rebuild instead of update (segments, SSTables, )A , staleness, and against the set of unmerged pieces. It buys the static structures of perfect hashing almost free
ApproximateCorrectness: a false-positive rate you must design around. This is Probabilistic structures
Restrict the workload (static key sets, monotonic keys, append-only)Flexibility, and a brittle coupling to an assumption that will eventually be broken by a product decision nobody told you about
Adapt at runtime (database cracking, adaptive indexes, self-tuning layouts)Unpredictability, and a performance profile that depends on query history, which makes incidents hard to reproduce