AZ-204 Develop for Azure storage Practice Question
A .NET app performs point reads from Cosmos DB by id and partition key. The team wants the lowest latency and best throughput efficiency. Which API call pattern should be used?
⚠ Common exam trap
Many candidates confuse efficient point reads with query-based approaches or event-driven patterns, mistakenly believing that stored procedures or change feed processors can achieve lower latency, when in reality they introduce unnecessary overhead for simple single-item lookups.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
ReadItemAsync with id and partition key
ReadItemAsync with id and partition key is the most efficient API call pattern for point reads in Cosmos DB because it directly accesses the document using the partition key and item ID, requiring only a single request to the exact partition and replica. This avoids the overhead of querying multiple partitions or scanning all items, resulting in the lowest latency and best throughput efficiency, as it consumes the minimum request units (RUs) possible for a read operation.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
ReadItemAsync with id and partition key
Why this is correct
The ReadItemAsync method, when provided with both the item's unique identifier (id) and its partition key, represents the most efficient point-read operation in Azure Cosmos DB. This combination allows the Cosmos DB gateway to route the request directly to the specific physical partition containing the item, bypassing the need for index lookups or cross-partition fan-out. It minimizes Request Units (RUs) consumed and latency, making it ideal for single-item retrieval.
- ✗
Stored procedure scanning all items
Why it's wrong here
A stored procedure, while executing server-side within a single logical partition, is not designed for efficient point reads across an entire container. Scanning all items within a stored procedure to locate a specific item by ID without leveraging direct access methods is highly inefficient, even if limited to a single partition. This approach would consume excessive Request Units (RUs) and introduce unnecessary latency compared to a direct item lookup.
- ✗
Change feed processor
Why it's wrong here
The Azure Cosmos DB change feed processor is designed to asynchronously process continuous streams of changes occurring within a container, such as inserts, updates, and deletes. It operates as an event-driven mechanism, not a direct query API for immediate data retrieval. Therefore, it is entirely unsuitable for performing a synchronous point read to fetch a specific item by its ID at a given moment.
- ✗
SELECT * query without partition key
Why it's wrong here
Executing a SELECT * query without specifying a partition key for a single-item lookup results in a cross-partition query, which is significantly less efficient than a point read. This type of query must fan out to all physical partitions in the Cosmos DB container, scanning each one for the matching item. This process consumes substantially more Request Units (RUs) and incurs higher latency, making it inefficient for retrieving a single known item.
Go deeper
Related to this question
About these practice questions
This AZ-204 question is part of Courseiva's 881-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.