SD Mastery
.
course
prep
arena
ask
shorts
stories
you
?
Search lessons, topics…
⌘K
?
L1
· Intern
0 / 100 xp → junior
~
course
prep
arena
ask
shorts
stories
you
Loading page…
~/himanshu
tty1
~/himanshu
$
cd ~/next-page
[ok]
resolve route
[
..
]
stream page
← all concepts
Partition key
.
also: partition keys · shard key · shard keys · sharding key
The 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.
Where the course teaches it
W01 · Day 1
Partitioning Deep-Dive
learn it →
Related concepts
Sharding
Hot key
Hash partitioning
Notebook
Ask