Point Operation

From Ilianko

← Back to DP-420 Terminology Reference

Category: Client Connectivity & SDK

Summary: Single-item operation using id + partition key, more RU-efficient than a query.

Overview

A point operation is a single-item operation (create, read, replace, upsert, delete, or patch) performed using an item's id and partition key value, executed directly against the specific logical partition without needing a query engine. Point operations are typically far more RU-efficient than equivalent queries because Azure Cosmos DB can route directly to the exact item.

PatchItemAsync with a list of PatchOperation.Increment("/viewCount", 1) and PatchOperation.Set("/lastViewed", now) Explanation Correct. The Patch API supports targeted operations like Add, Set, Replace, Remove, and Increment on specific JSON paths, letting the client update viewCount and lastViewed without transferring or re-sending the whole document.

More Info & Links

DP-420 Style Practice Questions

Q1. What distinguishes a point operation from a query operation in Azure Cosmos DB?

  • A. A point operation targets a single item directly using its id and partition key, without needing the query engine
  • B. A point operation always returns multiple items
  • C. A point operation is only available for the MongoDB API
  • D. A point operation requires a composite index

Q2. Why are point operations generally more RU-efficient than equivalent queries?

  • A. They route directly to the specific item without scanning or query processing overhead
  • B. They are always executed in gateway mode
  • C. They bypass the need for a partition key
  • D. They automatically batch multiple items together

Answer Key

Answers are listed at the very end so you can attempt the questions first.

  • Q1 (Point Operation): A. A point operation targets a single item directly using its id and partition key, without needing the query engine — Point operations act on a single, specifically identified item (by id + partition key), bypassing the query engine.
  • Q2 (Point Operation): A. They route directly to the specific item without scanning or query processing overhead — Point operations avoid the overhead of query parsing/execution, making them cheaper in RUs for retrieving a known item.

DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page