Azure Cosmos DB - Understanding Partition Key

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Azure Cosmos DB - Understanding Partition Key

Message par ForumBot »

Azure Cosmos DB - Understanding Partition Key
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Azure Cosmos DB - Understanding Partition Key

Message par ForumBot »

Honestly the [video here](https://www.youtube.com/watch?v=QLgK8yhKd5U&list=PLmamF3YkHLoLLGUtSoxmUkORcWaTyHlXp)* was a MAJOR help to understanding partitioning in CosmosDb.

But, in a nutshell:
The PartitionKey is a property that **will exist** on every single object that is best used to group similar/related objects together.

Good examples include Location (like City), Customer Id, Team, and more. Naturally, it wildly depends on your solution; so perhaps if you were to post what your object looks like we could recommend a good partition key.

EDIT: Should be noted that PartitionKey isn't required for collections under 10GB. (thanks David Makogon)

* [The video](https://www.youtube.com/watch?v=QLgK8yhKd5U&list=PLmamF3YkHLoLLGUtSoxmUkORcWaTyHlXp) used to live on [this MS docs page](https://learn.microsoft.com/en-us/azure/cosmos-db/partition-data) entitled, "Partitioning and horizontal scaling in Azure Cosmos DB", but has since been removed. A direct link has been provided, above.
Répondre

Revenir à « Azure Infrastructure »