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.

posta un anno fa207 visualizzazioni
1 Risposta
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
ESPERTO
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande