QuestionQ183

Optimize an Azure Cosmos DB solution

You have an Azure Cosmos DB for NoSQL container named Container1 that holds 500 GB of data.

You plan to run cross-partition queries that target Container1. The queries will specify the partition key values in the db filters.

You need to minimize the query cost.

What should you do?

  • A Decrease the value of the MaxBufferedItemCount parameter.
  • B Add the DISTINCT keyword to the queries.
  • C Decrease the value of the MaxConcurrency parameter.
  • D Add the in keyword to the queries.
Explanation

Using the IN keyword with partition-key values limits a cross-partition query to the relevant partitions, reducing fan-out and request-unit consumption. Query buffering and concurrency settings affect client execution behavior, not the underlying query cost, and DISTINCT adds processing.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!