A courts exhibit-metadata store in Cosmos DB needs lower RU cost for queries filtering on caseType and filedDate. What should the team optimize?
Select an answer to reveal the explanation.
Short Explanation
Composite indexes are express lanes for courts metadata—caseType plus filedDate gets a tuned Cosmos index so queries spend fewer RUs instead of wandering the whole garage.
Full Explanation
A composite index on caseType and filedDate in the Cosmos DB indexing policy reduces RU charges for courts exhibit-metadata queries that filter (and often order) on those paths together. Composite indexes give the query engine an efficient index path instead of more expensive scans or less selective single-property plans. For municipal courts metadata, tuning indexes to real filters is the right RU optimization among the options.
Removing all indexes and forcing full container scans fails by concept because scans increase RU cost and latency—the opposite of optimization. Increasing consistency to strong globally as the only RU technique fails because consistency is about staleness/latency tradeoffs across replicas, not a substitute for proper indexing on filter paths. Storing exhibit metadata as unqueryable binary blobs fails because it prevents indexed query on caseType and filedDate entirely.
Exam caveat: Composite indexes must match the order of filter/ORDER BY properties as Cosmos rules require; wrong order may not help. Indexing policy changes apply to new writes and may need careful rollout. Over-indexing unused paths also costs write RUs—index what courts queries actually use.
Operational check: Capture a representative query on caseType and filedDate, measure RU before change, add the composite index to the indexing policy, remeasure RU and latency, and confirm courts exhibit lookups meet budget. Review other hot queries for additional composites without indexing noise fields.