Cost of DynamoDB paginated query

0

If DynamoDb's paginated query feature is used, will the cost of getting the first page of results be equal to the cost of getting all page's results?

I only want to know know if any records match a query of how many records have a partition key value matching a specific value and a sort key value less than a specified value, so I was thinking of using a paginated query with a limit of one. If the query returns any results for the first page then I know there's a match. I want to avoid fetching every record, because often there will be hundreds of thousands of matches but I only need to know if there is at least one.

質問済み 1年前207ビュー
1回答
0

You only pay for what you read. If you have a limit of 1 then you only pay to read one item.

However, if you use a filter expression then you pay to read whatever items match your KeyConditionExpression and the FilterExpression is applied afterwards.

In summary, whatever matches the KeyConditionExpression will be read, but can be reduced by using Limit.

profile pictureAWS
エキスパート
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ