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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南