Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does DynamoDB query that returns an empty result set consume any capacity?

If my query to DynamoDB table returns an empty result set, does it count to the provisioned capacity? If not, does that mean I can query as frequently as I want without being throttled as long as there's no record matching?

like image 368
MGhostSoft Avatar asked Mar 31 '16 17:03

MGhostSoft


People also ask

What does DynamoDB query return?

In a Query operation, DynamoDB retrieves the items in sorted order, and then processes the items using KeyConditionExpression and any FilterExpression that might be present. Only then are the Query results sent back to the client. A Query operation always returns a result set.

What is consumed capacity in DynamoDB?

One write capacity unit represents one write per second for an item up to 1 KB in size. If you need to write an item that is larger than 1 KB, DynamoDB must consume additional write capacity units. Transactional write requests require 2 write capacity units to perform one write per second for items up to 1 KB.

How many items can a DynamoDB query return?

The BatchGetItem operation returns the attributes of one or more items from one or more tables. You identify requested items by primary key. A single operation can retrieve up to 16 MB of data, which can contain as many as 100 items.

Does DynamoDB accept empty string?

Amazon DynamoDB now supports empty values for non-key String and Binary attributes in DynamoDB tables. Empty value support gives you greater flexibility to use attributes for a broader set of use cases without having to transform such attributes before sending them to DynamoDB.


1 Answers

You will still consume read throughput if there is an empty result set.

Relevant section from the Item Size Calculations documentation:

If you perform a read operation on an item that does not exist, DynamoDB will still consume provisioned read throughput: A strongly consistent read request consumes one read capacity unit, while an eventually consistent read request consumes 0.5 of a read capacity unit.

like image 51
mkobit Avatar answered Oct 06 '22 22:10

mkobit