amazon DynamoDb performace comparision between replacing an entire item (using putItem) and making only required updates (using updateItem) -
from working items: java know possible "update" item using putitem. putitem replace entire item. recommended use updateitem because updateitem method modify item attributes specify in input, , other attributes in item remain unchanged.
my question 'is there performance difference between replacing entire item , updating required fields in amazon dynamo db'
what impact on performance if number of items update
- small
- large
a question on difference between 2 functions has been asked here. want detailed answer regarding performance differences.
a put or partial update consume same amount of throughput when write item dynamodb.
from documentation: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/capacityunitcalculations.html
putitem—writes single item table. if item same primary key exists in table, operation replaces item. calculating provisioned throughput consumption, item size matters larger of two.
updateitem—modifies single item in table. dynamodb considers size of item appears before , after update. provisioned throughput consumed reflects larger of these item sizes. even if update subset of item's attributes, updateitem still consume full amount of provisioned throughput (the larger of "before" , "after" item sizes).
Comments
Post a Comment