Sharding · Multiple choice

Which query gets much more expensive if you partition by a hash of the key instead of by key range?

medium Databases

Options

Why

Hashing scatters neighbouring keys across all shards, so a range scan must ask every shard. Range partitioning keeps them together, but risks hot spots when writes cluster at one end of the range.

Review this in your daily deck All cards in Sharding