CosmosDB分区键值长度

huangapple go评论55阅读模式
英文:

CosmosDB partition key value length

问题

我看到了很多关于在CosmosDB中选择好的分区键的内容,但我想知道短分区键值和长分区键值是否有优势?显然,特别长的分区键值会使文档变得更长,消耗更多的RUs,但除此之外,是否有任何区别?

英文:

I've seen a lot written about choosing good partition keys in CosmosDB, but I was wondering whether there are advantages to short or long partition key values? Obviously particularly long ones will make the documents longer, which will consume more RUs, but other than that, does it make any difference?

答案1

得分: 1

分区键值本身的长度对性能或可扩展性没有直接影响。分区键值的长度只是在选择 Cosmos DB 容器的分区键时需要考虑的因素之一。最重要的是选择一个具有大量不同值的属性,使您能够在这些值之间均匀分配工作负载。
选择分区键

英文:

The length of the partition key value itself doesn't have a direct impact on performance or scalability.
The length of your partition key value is just one factor to consider when choosing a partition key for your Cosmos DB container. The most important thing is to choose a property that has a number of distinct values and lets you distribute your workload evenly across these values.
Choose a partition key

huangapple
  • 本文由 发表于 2023年6月5日 21:30:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/76406929.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定