来自AWS DynamoDB documentation :
If you define a primary key attribute as a string type attribute, the following additional constraints apply:
- For a simple primary key, the maximum length of the first attribute value (the partition key) is 2048 bytes.
- For a composite primary key, the maximum length of the second attribute value (the sort key) is 1024 bytes.
这是否意味着在复合主键的情况下,分区键的最大长度不受限制?
(每个项目的大小限制一般为 400 KB,但问题不是这个)
最佳答案
我很确定它只是说 2048 字节是所有分区键的限制,如果您碰巧有一个排序键,那么该排序键的限制为 1024 字节。这似乎也是他们在 this page 上更清楚地说的话。 .
关于amazon-web-services - AWS DynamoDB 中复合主键的分区部分是否有大小限制?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38557528/