gpt4 book ai didi

amazon-web-services - AWS DynamoDB API 是否对二级索引查询中返回的记录数有限制?

转载 作者:行者123 更新时间:2023-12-04 12:51:04 26 4
gpt4 key购买 nike

我正在使用 Java SDK 使用 DynamoDB。这里的情况是,我有一个二级索引,查询时返回的结果中可能包含 1000 多条记录。我不确定 DynamoDB 是以分页形式返回结果还是一次返回所有记录?

谢谢。

最佳答案

Dynamodb 对结果进行分页

http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Pagination

DynamoDB paginates the results from Query and Scan operations. With pagination, Query and Scan results are divided into distinct pieces; an application can process the first page of results, then the second page, and so on. The data returned from a Query or Scan operation is limited to 1 MB; this means that if the result set exceeds 1 MB of data, you'll need to perform another Query or Scan operation to retrieve the next 1 MB of data.

If you query or scan for specific attributes that match values that amount to more than 1 MB of data, you'll need to perform another Query or Scan request for the next 1 MB of data. To do this, take the LastEvaluatedKey value from the previous request, and use that value as the ExclusiveStartKey in the next request. This approach will let you progressively query or scan for new data in 1 MB increments.

关于amazon-web-services - AWS DynamoDB API 是否对二级索引查询中返回的记录数有限制?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38456749/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com