Single & Batch Item Operations

Single Item Operation

A Single Item Operation, as it can operate on one and only one item in the table. Since an item is identified by its primary key, you MUST provide:

  • The Partition Key for an item if the table is defined with a simple primary key.

  • The Partition Key and the Sort Key if the table is defined with a composite primary key.

Example

single-item-read

Batch operations

Under the covers a batch operation invokes the single item operation multiple times. The primary key for the items is specified in the batch operation parameter. This saves on the network back-and-forth overheads, as a result you will get better performance.