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)
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
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.
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
...
...
This section is not available anymore. Please use the main Exam Page.DP-420 Exam Questions
Log in to ExamTopics
Sign in:
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.
Internal_Koala
Highly Voted 2 years, 1 month agojosch123
2 years agoEmil_Topics
Highly Voted 1 year, 1 month ago3709334
Most Recent 4 months agoTimSss
2 years agoExamsBertia
2 years, 1 month agoessdeecee
2 years, 1 month agoxRiot007
9 months, 3 weeks ago