A partition key helps decide where data lives. In Azure Table Storage, it identifies the physical partition for an entity and forms one half of that entity’s unique identifier. The row key identifies the entity within its partition; together, the two keys identify it within the table. Azure can move a partition to another machine when it faces high load or needs more space. section 5.6.2
PS C:\>Add-AzTableRow -table $cloudTable -partitionKey 'bookkey1'
-rowKey ((New-Guid).Guid) -property @{"title"="Azure in Action";"bookid"=1}
This PowerShell insertion gives an entity the partition key `bookkey1`, a GUID row key, and two properties. The partition key is not the book’s title or the whole unique identifier. section 5.6.2
Partition-key choice also matters in Azure Cosmos DB. For an online store, using `category` groups items in the same category so queries can locate them quickly. But a key that concentrates too much data or too many requests in one partition can create a performance bottleneck—a hot partition. section 11.3.2
Choose a key with both distribution and common queries in mind:
- Look for many distinct values so data and requests spread across partitions. section 11.3.2
- If queries commonly filter by region, a region key can make them more efficient—but only if the resulting load is reasonably balanced. section 11.3.3
- Consider a combined key such as region-category when one attribute alone risks a hotspot. Queries spanning partitions can cost more request units and take longer. section 11.3.3









