You have the following query.
SELECT * FROM с
WHERE c.sensor = "TEMP1"
AND c.value < 22
AND c.timestamp >= 1619146031231
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)
Answer: A
Explanation:
If a query has a filter with two or more properties, adding a composite index will improve performance.
Consider the following query:
SELECT * FROM c WHERE c.name = “Tim” and c.age > 18
In the absence of a composite index on (name ASC, and age ASC), we will utilize a range index for this query. We can improve the efficiency of this query by creating a composite index for name and age.
Queries with multiple equality filters and a maximum of one range filter (such as >,<, <=, >=, !=) will utilize the composite index.
Reference: https://azure.microsoft.com/en-us/blog/three-ways-to-leverage-composite-indexes-in-azure-cosmos-db/
Latest DP-420 Dumps Valid Version with 51 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund