DP-200 Exam QuestionsBrowse all questions from this exam

DP-200 Exam - Question 156


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 156

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 and OrderId as a value.

Does this meet the goal?

Show Answer
Correct Answer: B

Creating a lookup collection with ProductName as the partition key and OrderId as a value does not effectively address the problem of slow queries by ProductName. While it may provide a mapping mechanism, it does not optimize the query performance directly for the original data structure within the Sales container. A better approach would be to create a secondary index on the ProductName attribute within the Sales container, which would directly improve query performance for retrieving data by ProductName.

Discussion

5 comments
Sign in to comment
VJ8
Jun 3, 2020

Question looks bit ambiguous. When you create look-up collection, it should have "productName" as the partition key. In addition it will have "row key" and value as Order Id. So answer is Yes considering the question is not complete.

indradatabricks
Jul 11, 2020

The Question is NOT complete. We can consider the value as Order Id. In that case it would be 'YES'.

dumpsm42
Dec 11, 2020

hi to all, the answer is no. in another exam the same question but now complete "...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 and OrderId as a value...." that states well the use of OrderId as value and this is correct. So using this we can say the other is incomplete and is false regards

lgtiza
Jun 29, 2021

You are describing exactly this one. The previous one had the "orderID as a value" missing.

Shreyas_18
Nov 20, 2020

Ans should be Yes

mohowzeh
Dec 21, 2020

The answer is "No". See the next question, where more information is added.