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.

demandé il y a un an207 vues
1 réponse
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
EXPERT
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions