Medium1 markMultiple Choice
Domain 2.4: Non-Relational Data StorageDomain 2Cosmos DBPartitioningPerformance

AZ-305 · Question 28 · Domain 2.4: Non-Relational Data Storage

You are designing an Azure Cosmos DB database for an IoT application that tracks vehicle telemetry.

The database will store millions of documents per day. You need to select a partition key. The most common query will retrieve all telemetry for a specific vehicle on a specific date.

Which TWO characteristics describe a good partition key for this workload? (Select TWO)

Answer options:

A.

It has a low cardinality (few distinct values).

B.

It has a high cardinality (many distinct values).

C.

It distributes storage and Request Units (RUs) evenly across logical partitions.

D.

It frequently changes over the lifetime of the document.

E.

It is omitted from the most common queries to save bandwidth.

How to approach this question

Recall the best practices for Cosmos DB partition keys: high cardinality, even distribution, and inclusion in common queries.

Full Answer

It has a high cardinality (many distinct values)., It distributes storage and Request Units (RUs) evenly across logical partitions.
In Cosmos DB, choosing the right partition key is critical for scalability. A good partition key must have high cardinality (a large number of distinct values) to ensure data can be spread across many physical partitions as the database grows. It must also distribute storage and compute (Request Units) evenly to avoid 'hot partitions'. For this scenario, a synthetic key like `VehicleID-Date` would be ideal, as it has high cardinality and matches the most common query pattern.

Common mistakes

Thinking low cardinality is better for grouping data. In Cosmos DB, logical partitions have a 20GB limit; low cardinality quickly hits this limit.

Practice the full Azure Solutions Architect Expert AZ-305 Practice Exam 2

55 questions · hints · full answers · grading

More questions from this exam