Skip to main content

Generally Available: Azure Cosmos DB hierarchical partition keys

Published date: May 23, 2023

Hierarchical partition keys in Azure Cosmos DB are now generally available. The feature enables more optimal partitioning strategies for multi-tenant scenarios or workloads that would otherwise use synthetic partition keys. Instead of having to choose a single partition key – which often leads to performance trade-offs – you can now use up to three keys to further sub-partition your data, enabling more optimal data distribution and higher scale.


Behind the scenes, Azure Cosmos DB will automatically distribute your data among physical partitions such that a logical partition prefix can exceed 20GB of storage. In addition, queries that target a prefix of the full partition key path are efficiently routed to the subset of relevant physical partitions.

This feature is applicable for NoSQL API accounts and must be enabled at time of container creation.

Learn More

  • Azure Cosmos DB
  • Features
  • Microsoft Build

Related Products