Query and scan best practices

Query and scan, as we know, are heavy operations and mostly deal with read capacity units provisioned for the particular table. It is very important to take care of even distribution of load considering that the read capacity units get utilized properly. Here are some best practices that you should follow in order to avoid getting exceptions about exceeding provisioned throughput.

Maintaining even read activity

We know that a scan operation fetches 1 MB of data for a single request per page. We also know that an eventually consistent read operation consumes two 4 KB read capacity units per second. This means that a single scan operation costs (1 MB / 4 KB items / two eventually consistent reads) = 128 reads, which would ...

Get Mastering DynamoDB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.