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¶
- sources/2026-04-21-planetscale-announcing-vitess-21 — Vitess 21 adds explicit support to the
Materializecommand to replicate a set of reference tables into a sharded keyspace: "Using reference tables allows Vitess to execute joins in parallel on each shard, thus avoiding cross-shard joins. Previously, we recommended creating Materialize workflows for reference tables but did not provide an easy way to do so." Canonical new wiki instance of the patterns/reference-table-materialization-via-vreplication pattern.