AI-200 practice question · Develop AI Solutions by Using Azure Data Management Services
A team stores telemetry in a large Azure Cosmos DB for NoSQL container that spans many physical partitions and is…
A team stores telemetry in a large Azure Cosmos DB for NoSQL container that spans many physical partitions and is partitioned on /deviceId. A query that filters only on c.location consumes far more request units (RUs) than a similar query that filters on c.deviceId with an equality filter. What explains the difference?
- AThe query fans out and runs separately against each physical partition's own index, and every partition checked adds RU charge even if it holds no matching items.
- BThe query skips the index and does a full scan of every item in the container, because Cosmos DB only uses indexes when a partition key value is supplied.
- CThe query is resolved through a default global index that spans all partitions, and lookups against that global index are billed at a higher RU rate.
- DOmitting the partition key makes the query run at strong consistency regardless of the account default, and strong-consistency reads cost more RUs.
Show the answer and explanation
Correct answer: A) The query fans out and runs separately against each physical partition's own index, and every partition checked adds RU charge even if it holds no matching items.
Without an equality filter on the partition key, Cosmos DB fans the query out to every physical partition and checks each partition's index. Each check incurs RU charges, so the cost grows with the number of partitions. Queries filtered by partition key are routed straight to the relevant partition.
Why each option is right or wrong
- A) Correct. With no partition key filter, Cosmos DB can't route the query to one partition. In effect it runs one query per physical partition against that partition's index. You pay a minimum charge (about 2.5 RUs) for each partition checked, even when nothing matches, so the RU cost grows with the number of physical partitions.
- B) Incorrect. Cross-partition queries still use each physical partition's index when one is available. The extra cost comes from checking every partition's index separately, not from skipping indexing.
- C) Incorrect. Cosmos DB has no default global index. Each physical partition has its own independent index. Global secondary indexes exist only as an optional feature you create explicitly.
- D) Incorrect. Whether a query includes a partition key filter doesn't change its consistency level. The higher cost comes from the fan-out across physical partitions.
- Exam domain
- Develop AI Solutions by Using Azure Data Management Services · 28% of AI-200
- Question type
- Multiple choice (one answer)
Related AI-200 questions
- A team is building a prototype AI app on Azure Cosmos DB for NoSQL in a single Azure region.Develop AI Solutions by Using Azure Data Management Services
- A team is adding a knowledge store to an Azure AI Search skillset so that enriched output is saved as table projections…Develop AI Solutions by Using Azure Data Management Services
- An Azure AI Search indexer pulls data from a SQL view in Azure SQL Database that joins several tables.Develop AI Solutions by Using Azure Data Management Services
- A production Azure AI Search service runs on the Standard tier with three replicas in a region that supports…Develop AI Solutions by Using Azure Data Management Services
All 60 free AI-200 questions by domain · 15 sample questions on one page
Practise the full AI-200 exam
This question is one of a small free sample from the CertRidge AI-200 bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.
Original question written from the official exam guide. Not affiliated with Microsoft; never copied from the real exam.