You have an application that queries an Azure Cosmos DB Core (SQL) API account. You discover that the following two queries run frequently. You need to minimize the request units (RUs) consumed by reads and writes. What should you create?
A.
a composite index for (name DESC, timestamp ASC)
B.
a composite index for (name ASC, timestamp ASC) and a composite index for (name DESC, timestamp DESC)
C.
a composite index for (name ASC, timestamp ASC)
D.
a composite index for (name ASC, timestamp DESC)
Suggested Answer:C🗳️
You should customize your indexing policy so you can serve all necessary ORDER BY queries. ORDER BY queries on multiple properties: The following considerations are used when using composite indexes for queries with an ORDER BY clause with two or more properties: * The composite index also supports an ORDER BY clause with the opposite order on all paths. * If the composite index paths do not match the sequence of the properties in the ORDER BY clause, then the composite index can't support the query. * The order of composite index paths (ascending or descending) should also match the order in the ORDER BY clause. Consider the following example where a composite index is defined on properties name, age, and _ts: Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/index-overview
Here is a better link for you to put in the Solution: https://learn.microsoft.com/en-us/azure/cosmos-db/index-policy#order-by-queries-on-multiple-properties
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.
azuredemo2022three
Highly Voted 1 year, 6 months agoxRiot007
Most Recent 12 months ago