All Questions
Dynamodb medium

A developer uses a `FilterExpression` in a `Scan` to find users where `Age > 18`. Why does this NOT reduce the Read Capacity Unit (RCU) consumption of the request?

  1. A Because DynamoDB only counts the write cost, never the read cost, for filters.
  2. B Evaluation Order: DynamoDB reads all the items from the disk first (consuming RCUs), and then filters them at the API layer before returning the result to the client. You are charged for every item read, even if it is discarded by the filter.
  3. C Filters are only applied to the GSI, not the base table.
  4. D Filters actually increase RCU because the database has to perform additional math operations.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions