Partition key.
also: partition keys · shard key · shard keys · sharding keyThe field whose value decides which partition a record lives on, such as short_code or user_id.
the two-minute refresher
- Choose the key your hottest query always has: every redirect carries its short_code.
- A good key spreads load evenly; a bad one creates hot partitions.
- Queries without the key become scatter-gather across every partition.
- Changing the key later means migrating all the data, so decide early.