Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam DP-420 All Questions

View all questions & answers for the DP-420 exam

Exam DP-420 topic 4 question 6 discussion

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

HOTSPOT -
You have an Azure Cosmos DB Core (SQL) API account that frequently receives the same three queries.
You need to configure indexing to minimize RUs consumed by the queries.
Which type of index should you use for each query? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: Range -
Range index is based on an ordered tree-like structure. The range index type is used for:
Equality queries:
SELECT * FROM container c WHERE c.property = 'value'
SELECT * FROM c WHERE c.property IN ("value1", "value2", "value3")

Box 2: Composite -
Composite indexes increase the efficiency when you are performing operations on multiple fields. The composite index type is used for:
Queries with a filter on two or more properties where at least one property is an equality filter
SELECT * FROM container c WHERE c.property1 = 'value' AND c.property2 > 'value'

Box 3: Composite -
Incorrect:
Spatial indices enable efficient queries on geospatial objects such as - points, lines, polygons, and multipolygon. These queries use ST_DISTANCE, ST_WITHIN,
ST_INTERSECTS keywords.
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/index-overview

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
azuredemo2022three
1 year, 4 months ago
Range Composite Composite
upvoted 3 times
...
essdeecee
2 years, 2 months ago
B should be range from the link supplied : https://docs.microsoft.com/en-us/azure/cosmos-db/index-overview#:~:text=Range%20queries%3A,of%20a%20property%3A
upvoted 1 times
Internal_Koala
2 years, 1 month ago
B is correct as composite: "Queries with a filter on two or more properties where at least one property is an equality filter" There is an equality filter on the city name.
upvoted 4 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 ...