按位置检索DynamoDB中的记录
我们有一个应用程序,客户需要请求按日期进行DynamoDB过滤上存储的一些信息。我们拥有使用API网关创建的服务,并在DynamoDB上检索相应的记录,因此我们必须检索30segs中的所有必要记录。
记录的数量不断增加,我们在以下内容中考虑:
- 客户将以具体订单(0-100、100-200、200-300等)要求记录,以便在前端的混凝土页面。
- 后端将处理请求(因此在DynamoDB上搜索)有关该混凝土记录的顺序(0-100、100-200等),
在DynamoDB上有任何方法可以将记录从具体位置获取到具体位置?还是唯一的方法是检索该日期范围的所有记录,然后将具体位置发送给客户?
先感谢您, 此致。
We have an application where the client needs to request some information stored on DynamoDB filtering by date. We have the service created with API Gateway and a Lambda retrieving the corresponding records on DynamoDB, so we have to retrieve all the necessary records in <30segs.
The volume of the records keeps increasing and we have thought in the following:
- The client will ask for records in a concrete order (0-100, 100-200, 200-300, etc...) in order to display them on a concrete page on the frontend.
- The backend will handle requests (and therefore search on DynamoDB) for that concrete order of records (0-100, 100-200, etc...)
Is there any way on DynamoDB to get the records from a concrete position to a concrete position? Or the only way is to retrieve all the records for that date range and then send the concrete positions to the client?
Thank you in advance,
Best regards.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您没有指定模式,所以我要给你一个。 :)
设置一个位置号的排序键。然后,您可以通过位置编号范围有效地检索。
或者,如果要使用时间戳,而不是使用序数,则只需将其下一个请求的Sort Key起点传递给客户端,然后将其用作下一个查询的LOWRR值即可。
无法在项目集合中有效找到许多项目。
You don’t specify a schema so I’m going to give you one. :)
Setup a sort key that’s the position number. Then you can efficiently retrieve by position number range.
Or instead of using ordinals if you want to use timestamps then just pass to the client the sort key starting point for their next request and use it as the lowrr value for the next query.
There’s no way to efficiently find the Nth many item in an item collection.