Question 464 of 982

DP-900 Practice Question: Identify considerations for relational data on Azure

This DP-900 practice question tests your understanding of identify considerations for relational data on azure. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. A key principle to apply: composite indexes on multiple columns optimize queries with multiple filter conditions.. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A company runs an e-commerce application on Azure SQL Database. The database has a table named Orders with columns: OrderID (int, primary key), CustomerID (int), OrderDate (datetime), TotalAmount (decimal). The application frequently runs the following query: SELECT * FROM Orders WHERE CustomerID = 12345 AND OrderDate BETWEEN '2025-01-01' AND '2025-01-31' ORDER BY OrderDate DESC. The table contains 10 million rows. Which index would best optimize this query?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "best"

    Why it matters: Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.

  • Clue: "primary"

    Why it matters: Asks for the main purpose or function, not a secondary benefit. Eliminate answers that describe side-effects or partial functions.

Question 1mediummultiple choice
Full question →

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

A nonclustered index on (CustomerID, OrderDate DESC) including TotalAmount as included column.

Option B is correct because the query filters on both CustomerID and OrderDate, so a composite nonclustered index on (CustomerID, OrderDate DESC) allows SQL Server to perform an index seek on CustomerID and then an ordered range scan on OrderDate, avoiding a sort operation. Including TotalAmount as an included column makes the index covering, so the query can be satisfied entirely from the index without key lookups to the clustered index.

Key principle: Composite indexes on multiple columns optimize queries with multiple filter conditions.

Answer analysis

Option-by-option breakdown

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

  • A nonclustered index on OrderDate only.

    Why it's wrong here

    An index on OrderDate alone would help date range scans, but still requires filtering on CustomerID, leading to key lookups or residual predicates. It is not as efficient as a composite index that includes CustomerID.

  • A nonclustered index on (CustomerID, OrderDate DESC) including TotalAmount as included column.

    Why this is correct

    This composite index covers both filter conditions (CustomerID equality, OrderDate range) and includes TotalAmount to avoid key lookups. The descending order helps with ORDER BY OrderDate DESC without additional sorting.

    Clue confirmation

    The clue words "best", "primary" in the question point toward this answer.

    Related concept

    Composite indexes on multiple columns optimize queries with multiple filter conditions.

  • A clustered index on (OrderDate, CustomerID).

    Why it's wrong here

    A clustered index on these columns would physically reorder the table, which may impact other queries. Also, filtering by CustomerID first (equality) then OrderDate (range) is more efficient when CustomerID is the leading key. This order (OrderDate first) may not be optimal for equality on CustomerID.

  • A nonclustered index on (OrderDate DESC) only.

    Why it's wrong here

    Similar to option A, this helps with the order by but does not assist with the CustomerID filter, resulting in inefficient scans.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often think a single-column index on the most selective column (OrderDate) is sufficient, but they overlook that the query's equality filter on CustomerID must be the leading key column to enable an efficient seek, and that including the SELECT column avoids key lookups.

Trap categories for this question

  • Similar concept trap

    Similar to option A, this helps with the order by but does not assist with the CustomerID filter, resulting in inefficient scans.

Detailed technical explanation

How to think about this question

Under the hood, SQL Server uses the index key order to avoid sorting: with (CustomerID, OrderDate DESC), the index is already sorted by CustomerID and then by OrderDate descending, so the ORDER BY clause is satisfied without an explicit sort operator. The included column mechanism stores TotalAmount at the leaf level of the nonclustered index, making the index covering for this query and eliminating costly RID or key lookups. In a real-world scenario with 10 million rows, this index can reduce query cost from a table scan (millions of logical reads) to a few index seeks (dozens of reads).

KKey Concepts to Remember

  • Composite indexes on multiple columns optimize queries with multiple filter conditions.
  • Including columns in a nonclustered index avoids key lookups to the base table.
  • Index key order should match query filter and `ORDER BY` clause for optimal performance.
  • Descending index keys (`DESC`) can eliminate explicit sort operations for `ORDER BY DESC`.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Composite indexes on multiple columns optimize queries with multiple filter conditions.

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Composite indexes on multiple columns optimize queries with multiple filter conditions. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Review composite indexes on multiple columns optimize queries with multiple filter conditions., then practise related DP-900 questions on the same topic to reinforce the concept.

Related practice questions

Related DP-900 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free DP-900 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this DP-900 question test?

Identify considerations for relational data on Azure — This question tests Identify considerations for relational data on Azure — Composite indexes on multiple columns optimize queries with multiple filter conditions..

What is the correct answer to this question?

The correct answer is: A nonclustered index on (CustomerID, OrderDate DESC) including TotalAmount as included column. — Option B is correct because the query filters on both CustomerID and OrderDate, so a composite nonclustered index on (CustomerID, OrderDate DESC) allows SQL Server to perform an index seek on CustomerID and then an ordered range scan on OrderDate, avoiding a sort operation. Including TotalAmount as an included column makes the index covering, so the query can be satisfied entirely from the index without key lookups to the clustered index.

What should I do if I get this DP-900 question wrong?

Review composite indexes on multiple columns optimize queries with multiple filter conditions., then practise related DP-900 questions on the same topic to reinforce the concept.

Are there clue words in this question I should notice?

Yes — watch for: "best", "primary". Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.

What is the key concept behind this question?

Composite indexes on multiple columns optimize queries with multiple filter conditions.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This DP-900 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-900 exam.