Shard Keys, Scatter–Gather, and Local Joins
Connect a query’s predicates to placement and estimate how missing shard information creates fan-out.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
The shard key decides where an operation can be sent
A table distributed by customer identity can route an exact customer lookup to a known shard. A query filtering only by status may need requests to every shard unless another structure can narrow candidates. Shards can compute partial aggregates and a coordinator can combine them. End-to-end latency can depend on the slowest required response.
Co-location changes whether a join moves data
Orders and customers distributed compatibly by customer identity can join locally on that key. Joining by another attribute may require partitioning both relations on the new key or replicating one smaller input. Skew can make one destination responsible for most work. Partition pruning describes exclusion inside a declared layout. Distributed graph queries show similar communication constraints for more complex join patterns.[1][2]