Databases · Senior · Question 23 of 75

What makes a good shard key?

Explanation

A time-based key sends all new writes to one shard (a hotspot). Queries that cross shards are expensive, so keep a tenant's data together.

Further reading

Problem with a question

Databases · Senior · question 23

Test yourself

Take the Databases · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz