Skip to content

CONCEPT Cited by 1 source

Reference table materialization

Definition

Reference table materialization is the technique of copying a small, read-mostly lookup table from an unsharded keyspace into every shard of a sharded keyspace, so that joins between the lookup table and the sharded data can execute locally on each shard in parallel instead of fanning out to an unsharded join endpoint or performing a cross-shard gather. Canonical examples: tables of countries, states, ZIP codes, currency codes, product categories — low-cardinality, infrequently-updated lookups used in joins with the sharded user-data tables. The materialization is kept up to date by a replication workflow (in Vitess, VReplication's Materialize command), so changes in the source reference table propagate to every shard. The trade: write amplification × shard count for the reference table, in exchange for shard-local join semantics on every query that uses it.

Seen in

Last updated · 319 distilled / 1,201 read