An application stores customer profiles in Cosmos DB NoSQL. Queries filter by both country (low cardinality, 50 values) and userId (high cardinality, millions). What is the best partition key?
- A country
- B userId (correct answer)
- C country_userId (composite synthetic key)
- D A random GUID
Shortcut: userId offers high cardinality ensuring even distribution. country alone creates hot partitions (only 50 partitions). A synthetic composite key is useful when queries need both fields together.