Courseiva
Design and implement data storagehardMultiple SelectObjective-mapped

DP-203 Optimize Cosmos DB queries Practice Question

Your company stores JSON documents in Azure Cosmos DB Core (SQL) API. You need to improve query performance for a common filter on the 'status' field and a sort on 'timestamp'. Which three actions should you take?

⚠ Common exam trap

A common mix-up: candidates think increasing RU/s (Option B) or disabling indexing (Option E) are sufficient fixes, but the core issue is the lack of an appropriate composite index to support the combined filter and sort, which is a common DP-203 exam pattern for Cosmos DB query optimization.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Create a composite index on (status, timestamp)

A composite index on (status, timestamp) is correct because Azure Cosmos DB Core (SQL) API uses composite indexes to efficiently support queries with multiple filter and sort conditions. This index allows the query engine to first filter on the 'status' field and then sort by 'timestamp' in a single index seek, avoiding a full scan or in-memory sort. Without this composite index, the query would require a cross-partition scan or an expensive sort operation, degrading performance.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Denormalize the status field into a separate container

    Why it's wrong here

    Unnecessary complexity; composite index is sufficient.

  • Disable indexing on the timestamp field

    Why it's wrong here

    Sorting requires indexing on that field.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The DP-203 exam frequently reuses these exact scenarios with slightly different constraints.

Create a composite index on (status, timestamp)Correct answer
Denormalize the status field into a separate containerWrong answer — click to see why

Why this is wrong here

Unnecessary complexity; composite index is sufficient.

Disable indexing on the timestamp fieldWrong answer — click to see why

Why this is wrong here

Sorting requires indexing on that field.

Analysis generated from the official DP-203blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

About these practice questions

Courseiva writes every DP-203 question from scratch — 760 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DP-203 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DP-203 exam.