A chat application stores each conversation as one item in an Azure Cosmos DB for NoSQL container partitioned on /userId. When a user opens a conversation, the app already knows the conversation's id and the user's ID. The team wants the lowest RU charge and latency for this lookup. Which Python SDK call should the app use?
Choose one.
When both the id and the partition key are known, a point read is cheaper than any query.
read_item sends a direct request to the item's logical partition by id, so no query plan or index lookup is needed. Microsoft documents point reads as costing about 1 RU for a 1 KB item. A query with WHERE c.id = @id returns the same item but costs more because the query engine runs. A cross-partition query or a change feed read wastes even more RU.
- Check what the app knows: the item id and the partition key value.
- With both values, the item can be addressed directly without a query.
- Choose the point read; reserve queries for lookups that need filters or several items.
Exam tip: Known id + partition key = read_item point read, the lowest-RU way to fetch one item.
AI-200 Azure Cosmos DB for NoSQL: SDK Queries, RUs, Vector Search and Change Feed — the lesson that teaches this.