How consumed throughput is influenced by write into local secondary index with no change in data?

StackOverflow https://stackoverflow.com/questions/23520086

  •  17-07-2023
  •  | 
  •  

Question

Condider a table A with index A-index. I write around 100 items into A in batches (using PutRequest within BatchWriteItem).

If I repeat the operation with the same set of items, they will be just replacing the existing items. But how does that impact the local secondary index? Since it's a complete replace, does it replace in index also, thereby consuming throughput there too? Or does it figure out the items are exactly same and hence doesn't perform any operation, thereby resulting in no additional consumed throughput for index?

Was it helpful?

Solution

Found the answer by running a trial program and noticing the results in ConsumedCapacity attribute for table and indices.

During replace, if there are no changes, the consumed throughput is not calculated as DynamoDB figures out it's exactly the same. But if there are changes, throughput per item is calculated.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top