Can a custom indexing policy reduce request-unit costs while preserving range-query performance in Cosmos DB?
0 reputation · 05 May 2025, 18:59 UTC
Automatic indexing in Azure Cosmos DB for NoSQL indexes every property on write, simplifying schema evolution but consuming request units per operation. When a custom indexing policy excludes specific paths, the default composite index interaction with remaining fields becomes a design consideration, particularly for range and equality queries. The policy change triggers an index transformation that may introduce temporary latency proportional to item count and write throughput.
This raises the question of whether query functionality for commonly accessed fields can be maintained without incurring proportional RU overhead or availability risk. Does disabling automatic indexing on underutilized paths preserve equality-filter query performance? Can the index transformation be performed incrementally to avoid throttling? What observable metrics signal that the new indexing policy has fully taken effect?