exam questions

Exam DP-420 All Questions

View all questions & answers for the DP-420 exam

Exam DP-420 topic 4 question 4 discussion

Actual exam question from Microsoft's DP-420
Question #: 4
Topic #: 4
[All DP-420 Questions]

You have the following query.

You need to recommend a composite index strategy that will minimize the request units (RUs) consumed by the query.
What should you recommend?

  • A. a composite index for (sensor ASC, value ASC) and a composite index for (sensor ASC, timestamp ASC)
  • B. a composite index for (sensor ASC, value ASC, timestamp ASC) and a composite index for (sensor DESC, value DESC, timestamp DESC)
  • C. a composite index for (value ASC, sensor ASC) and a composite index for (timestamp ASC, sensor ASC)
  • D. a composite index for (sensor ASC, value ASC, timestamp ASC)
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Internal_Koala
Highly Voted 2 years, 1 month ago
Selected Answer: A
Solution is correct as there are two range filters: "Two separate composite indexes are required instead of a single composite index on (name ASC, age ASC, _ts ASC) since each composite index can only optimize a single range filter." Source: https://learn.microsoft.com/en-us/azure/cosmos-db/index-policy#queries-with-filters-on-multiple-properties
upvoted 7 times
josch123
2 years ago
This is a great source.
upvoted 2 times
...
...
Emil_Topics
Highly Voted 1 year, 1 month ago
This is a better link why A is the answer. https://learn.microsoft.com/en-us/azure/cosmos-db/index-policy#queries-with-filters-on-multiple-properties
upvoted 5 times
...
3709334
Most Recent 4 months ago
Selected Answer: A
correct
upvoted 1 times
...
TimSss
2 years ago
Selected Answer: A
Open the given link, the msft docs show explain this example
upvoted 3 times
...
ExamsBertia
2 years, 1 month ago
Selected Answer: A
Answer: Queries with multiple equality filters and a MAXIMUM of one range filter (such as >,<, <=, >=, !=) will utilize the composite index
upvoted 1 times
...
essdeecee
2 years, 1 month ago
Selected Answer: B
Consider this where clause WHERE c.categoryName = 'foo' AND c.name = 'bar' AND c.price < 909 Returns this result when checking index utilization: Index Utilization Information Utilized Single Indexes Index Spec: /name/? Index Impact Score: High --- Index Spec: /categoryName/? Index Impact Score: High --- Index Spec: /price/? Index Impact Score: High --- Potential Single Indexes Utilized Composite Indexes Index Spec: /categoryName ASC, /price ASC Index Impact Score: High --- Potential Composite Indexes Index Spec: /categoryName ASC, /name ASC, /price ASC Index Impact Score: High --- I believe the best index contains every clause.
upvoted 1 times
xRiot007
9 months, 3 weeks ago
You need 2 indexes, Read from the selected phrase downwards: https://learn.microsoft.com/en-us/azure/cosmos-db/index-policy#queries-with-filters-on-multiple-properties:~:text=Consider%20the%20following%20query%20with%20an%20equality%20filter%20and%20two%20range%20filters%3A
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago