DP-203 Design and implement data storage Practice Question
Exhibit
{
"name": "CustomerOrders",
"properties": {
"ResourceType": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
"Options": {
"throughput": 400
},
"Resource": {
"id": "CustomerContainer",
"partitionKey": {
"paths": ["/customerId"],
"kind": "Hash"
},
"indexingPolicy": {
"indexingMode": "consistent",
"automatic": true,
"includedPaths": [
{
"path": "/*"
}
],
"excludedPaths": [
{
"path": "/\"_etag\"/?"
}
]
},
"uniqueKeyPolicy": {
"uniqueKeys": [
{
"paths": ["/orderId"]
}
]
}
}
}
}Refer to the exhibit. You are reviewing an Azure Cosmos DB for NoSQL container configuration. The container stores customer orders. The application frequently queries orders by orderId. However, these queries are consuming high RUs and are slow. What is the most likely cause?
⚠ Common exam trap
Microsoft often tests the misconception that a unique key constraint automatically creates an index for querying, when in fact unique keys only enforce uniqueness and do not affect query performance; the trap is that candidates confuse unique keys with indexing policies.
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
✓
The unique key on orderId does not index the field; queries by orderId are cross-partition.
The unique key constraint on `orderId` does not automatically create an index for that field; it only enforces uniqueness. Without an explicit indexing policy that includes `orderId`, queries filtering by `orderId` must perform a cross-partition scan, which consumes high RUs and is slow. In Azure Cosmos DB for NoSQL, queries that cannot be served from a single physical partition due to missing index or partition key mismatch result in fan-out across all partitions, dramatically increasing RU consumption.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The unique key on orderId does not index the field; queries by orderId are cross-partition.
Why this is correct
Unique keys do not serve as indexes; the query must specify customerId to be efficient.
- ✗
The _etag field is excluded from indexing, causing high RU for queries that include it.
Why it's wrong here
_etag exclusion is standard and does not affect orderId queries.
- ✗
The indexing mode is set to consistent, which causes high RU usage.
Why it's wrong here
Consistent indexing is standard and not the cause.
- ✗
The container is provisioned with only 400 RU/s, which is too low for the workload.
Why it's wrong here
High RU consumption is due to cross-partition queries, not low throughput.
Go deeper
Related to this question
About these practice questions
One of 760 original DP-203 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DP-203 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 DP-203 exam.