It is unclear after reading documents how many units of reading capacity are consumed during a scan operation with a filter in DynamoDB. For example, using this ruby โโquery:
table.items.where(:MyAttribute => "Some Value").each do |item_data|
end
I understand that this will lead to a table scan, but DynamoDB will only return the items that interest me. But if my table contains 10,000 elements, and only 5 of these elements are what goes through my filter, am I still "charged" for a huge number of reading capacity units?
The attribute that I use for the filter is not a hash, range, or secondary index. I just had to add this attribute recently and unexpectedly, so I am not using the query instead.
source
share