DP-200 Exam QuestionsBrowse all questions from this exam

DP-200 Exam - Question 155


Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You have a container named Sales in an Azure Cosmos DB database. Sales has 120 GB of data. Each entry in Sales has the following structure.

Exam DP-200 Question 155

The partition key is set to the OrderId attribute.

Users report that when they perform queries that retrieve data by ProductName, the queries take longer than expected to complete.

You need to reduce the amount of time it takes to execute the problematic queries.

Solution: You create a lookup collection that uses ProductName as a partition key.

Does this meet the goal?

Show Answer
Correct Answer: B

Creating a lookup collection that uses ProductName as a partition key does not directly address the issue of optimizing queries by ProductName in the existing container. The problem specifies that the current structure causes slow queries when filtering by ProductName. Introducing a separate lookup collection without explicitly mapping ProductName to OrderId does not inherently improve the performance of those queries in the original container. Therefore, this solution does not meet the goal of reducing query execution time for queries by ProductName.

Discussion

1 comment
Sign in to comment
hoangton
May 18, 2021

Correct Answer: A One option is to have one lookup collections "ProductName" for the mapping of "ProductName" to “OrderId” Reference: https://azure.microsoft.com/sv-se/blog/azure-cosmos-db-partitioning-design-patterns-part-1/

lgtiza
Jun 29, 2021

Question is tricky because it doesn't say that is mapped to "OrderID". Correct answer is B, and the next question is the same but with the mapping to "OrderID" (no doubts there). Really tricky!