Microsoft

DP-420 practice question 16

Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB · free question 16 of 20

Question

You have a container in an Azure Cosmos DB for NoSQL account that stores data about orders. The following is a sample of an order document. ```json { "orderId" : "d4a9179b-5ead-43a3-b851-add9a71ac4b6", "customerId" : "f6e39103-bdc7-4346-9cfb-45daa4b2becf", "orderDate" : "2021-09-29", "orderItems" : [...], "total" : 12345 } ``` Documents are up to 2 KB. You plan to receive one million orders daily. Customers will frequently view their past order history. You are evaluating whether to use orderDate as the partition key. What are two effects of using orderDate as the partition key? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.
  • A. You will exceed the maximum number of partition key values
  • B. You will exceed the maximum storage per partition
  • C. There will always be a hot partition Correct
  • D. Queries will run cross-partition Correct

Explanation

With orderDate as the partition key, every order written on a given day lands in the same logical partition, so all write traffic concentrates on one partition at a time and there is always a hot partition. Customers viewing their order history filter by customerId, not by date, so those queries must fan out across every date partition. There is no limit on the number of distinct partition key values, and one million 2 KB orders per day is about 2 GB, well under the 20 GB logical partition limit.

Need the theory? Learn it free in the DP-420 course on Godlike Academy

Practice the whole free set

Answer all 20 free DP-420 questions with instant feedback, or unlock all 211 questions with Learn and Exam modes.