Cosmos DB queries on a rarely used property cost too many RUs, and writes are also expensive. What should you review?
Why D is the answer
The indexing policy, and include only the paths you query
Indexing every path raises write cost, and queries without a suitable index raise read cost. Tuning the policy addresses both.
In detail
- Each indexed path adds cost on writes.
- Include only the paths you query.
- Exclude large properties that are never filtered.
Use case
An illustrative scenario, not a real incident.
A catalog container indexes every property, so writes are expensive. Limiting the policy to queried paths cuts RUs on writes and keeps reads fast.
See it in different ways
flowchart TD
A["Query"] --> B{"Includes the partition key?"}
B -->|Yes| C["Single partition, lower RU cost"]
B -->|No| D["Cross-partition, higher RU cost"]mindmap
root((Cosmos DB))
Query cost
Use the partition key
Write cost
Index only what you query
Vectors
Stored in the documents
Changes
Change feedflowchart TD
Q{"Is the path queried?"}
Q -->|"Yes"| A0["Include it"]
Q -->|"No"| A1["Exclude it"]Key point: Index only what you query.
Why the other options are wrong
- A. The consistency level, set to strong for all reads
- Strong consistency can raise costs, and it is not the issue here.
- B. The partition count in the client SDK settings
- The client SDK does not set partitions.
- C. The container image tag used by the API
- An image tag has no effect on request units.

