Understanding partitioning schemes
To meet the performance needs of your application, Azure Cosmos DB uses partitioning to scale individual containers in a database. Cosmos DB partitions in a way that the items are divided into distinct subsets called logical partitions. These are formed based on the value of the partition key that is added to each item in the container. All of the items that are in a logical partition have the same partition key. Each item in a container has an item ID (which is unique within the logical partition). To create the item's index, the partition key and the item ID are combined. This uniquely identifies the item.
Tip
If you look at our sample application from the previous section, you will see that the partition key and item ID have been combined.
Besides logical partitions, Azure Cosmos DB also has physical partitions:
- Logical partitions: A set of items that have the same partition key is called a logical partition. For instance...