Question 192 of 982

Quick Answer

The correct choice is to create a nonclustered index on (Author, PublishedYear DESC) INCLUDE (CopiesAvailable, Title, ISBN). This strategy works because it builds a covering index for filter and sort queries, allowing SQL Server to seek directly on the Author column and then scan the PublishedYear values in descending order without needing a separate sort operation. By including the remaining columns as non-key entries, the index covers all data requested, eliminating expensive key lookups to the clustered index. On the DP-900 exam, this scenario tests your understanding of how index key order and included columns directly impact query performance—a common trap is choosing an index that only filters but forces a sort afterward. Remember the memory tip: "Key it to filter, order it to sort, include the rest to cover."

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. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. 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 library management system uses Azure SQL Database. The Books table has 500,000 rows with columns: BookID (primary key, clustered), Title, Author, ISBN, PublishedYear, CopiesAvailable. Queries frequently filter by Author and then sort results by PublishedYear in descending order. Which indexing strategy will most improve query performance?

Clue words in this question

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

  • 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

Create a nonclustered index on (Author, PublishedYear DESC) INCLUDE (CopiesAvailable, Title, ISBN).

Option C is correct because it creates a covering index that matches the exact query pattern: filtering by Author and sorting by PublishedYear in descending order. By defining (Author, PublishedYear DESC) as the index key, SQL Server can perform an index seek on Author and an ordered scan on PublishedYear without a separate sort operation. Including the remaining columns (CopiesAvailable, Title, ISBN) as non-key columns makes the index covering, eliminating the need for key lookups to the clustered index.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Create a nonclustered index on (Author) INCLUDE (PublishedYear, CopiesAvailable, Title).

    Why it's wrong here

    This index covers the filter on Author but does not specify the sort order on PublishedYear. The database may still need to sort the results, which is less efficient.

  • Create a nonclustered index on (PublishedYear) INCLUDE (Author).

    Why it's wrong here

    This index is ordered by PublishedYear, but the primary filter is on Author. The database would need to scan or use lookups for each Author, which is inefficient.

  • Create a nonclustered index on (Author, PublishedYear DESC) INCLUDE (CopiesAvailable, Title, ISBN).

    Why this is correct

    This index is sorted by Author first and then PublishedYear descending, perfectly supporting both the filter and the sort. Included columns make it covering.

    Clue confirmation

    The clue word "primary" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Create a nonclustered columnstore index on (Author, PublishedYear, CopiesAvailable, Title, ISBN).

    Why it's wrong here

    Columnstore indexes are designed for large scan-heavy analytical queries, not for point lookups and sorted retrieval of few rows. This would not improve performance for this OLTP-style query.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often choose Option A because they think INCLUDING PublishedYear is sufficient for sorting, but they miss that the index key order must match the ORDER BY clause to avoid an explicit sort operation.

Detailed technical explanation

How to think about this question

Under the hood, SQL Server's query optimizer can leverage a composite index with a descending sort order on the second key column to avoid a sort operator in the execution plan, which is critical for performance when the result set is large. In real-world scenarios, such as a library system with millions of books, avoiding a sort can reduce query time from seconds to milliseconds. A subtle behavior: if the index key order does not match the ORDER BY clause exactly (including NULLS placement), SQL Server may still need to sort, but DESC on the key column directly satisfies the descending requirement.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

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

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

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. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. 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.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

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 — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Create a nonclustered index on (Author, PublishedYear DESC) INCLUDE (CopiesAvailable, Title, ISBN). — Option C is correct because it creates a covering index that matches the exact query pattern: filtering by Author and sorting by PublishedYear in descending order. By defining (Author, PublishedYear DESC) as the index key, SQL Server can perform an index seek on Author and an ordered scan on PublishedYear without a separate sort operation. Including the remaining columns (CopiesAvailable, Title, ISBN) as non-key columns makes the index covering, eliminating the need for key lookups to the clustered index.

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

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "primary". Asks for the main purpose or function, not a secondary benefit. Eliminate answers that describe side-effects or partial functions.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

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

Same concept, more angles

4 more ways this is tested on DP-900

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A library management system uses Azure SQL Database. The Books table has 500,000 rows with columns: BookID (primary key, clustered), Title, Author, ISBN, PublishedYear, CopiesAvailable. Queries frequently filter by Author and then sort results by PublishedYear in descending order. The queries also return the Title and CopiesAvailable columns. Which indexing strategy will most improve query performance for these operations?

medium
  • A.Create a nonclustered index on (Author, PublishedYear DESC) and include (Title, CopiesAvailable)
  • B.Create a nonclustered index on Author only
  • C.Create a nonclustered index on PublishedYear DESC
  • D.Keep only the existing clustered index on BookID

Why A: Option A is correct because it creates a covering nonclustered index on (Author, PublishedYear DESC) that directly supports the filter (Author) and sort (PublishedYear DESC) operations. Including Title and CopiesAvailable as non-key columns makes the index covering, meaning all required columns are in the index leaf level, so SQL Server can satisfy the query entirely from the index without key lookups to the clustered index. This minimizes I/O and improves query performance.

Variation 2. A company uses Azure SQL Database for an HR system. The Employees table has a clustered index on EmployeeID. Queries frequently filter on DepartmentID and LastName and also retrieve the Salary column. The table contains over a million rows. Which index strategy will most improve query performance for these filters?

medium
  • A.A: Create a nonclustered index on (DepartmentID, LastName) INCLUDE (Salary)
  • B.B: Create a nonclustered index on LastName only
  • C.C: Create a nonclustered index on DepartmentID and another nonclustered index on LastName
  • D.D: Change the clustered index to (DepartmentID, LastName)

Why A: Option A is correct because it creates a covering nonclustered index on the filter columns (DepartmentID, LastName) and includes the Salary column as an included column. This allows the query to be fully satisfied by scanning only the nonclustered index pages, avoiding key lookups to the clustered index. The order of columns in the index key matches the query filter pattern, maximizing seek efficiency.

Variation 3. A company has a table named 'Sales' in Azure SQL Database with columns: SaleID (int, primary key), ProductID (int), SaleDate (datetime), Quantity (int), UnitPrice (decimal), TotalAmount (computed column). Queries frequently run to retrieve the total Quantity and UnitPrice for a specific ProductID over a date range. The query filters on ProductID and SaleDate and selects only Quantity and UnitPrice. Which index would most improve query performance?

medium
  • A.Nonclustered index on (ProductID, SaleDate) INCLUDE (Quantity, UnitPrice)
  • B.Nonclustered index on (SaleDate) INCLUDE (Quantity, UnitPrice)
  • C.Clustered index on (ProductID, SaleDate)
  • D.Nonclustered index on (ProductID) INCLUDE (Quantity, UnitPrice)

Why A: Option A is correct because it creates a covering nonclustered index that supports both the WHERE clause (ProductID, SaleDate) and the SELECT clause (Quantity, UnitPrice) without needing to access the base table. The index key order matches the query filter, and the included columns avoid key lookups, minimizing I/O for the frequent aggregation queries.

Variation 4. A company uses Azure SQL Database for its e-commerce platform. During a traffic spike, queries against the Orders table become slow. The table has 10 million rows and is clustered on OrderId. The most common query filters by CustomerId and OrderDate range. Which index change would most improve performance?

hard
  • A.Create a clustered index on CustomerId
  • B.Partition the table by OrderId
  • C.Create a nonclustered index on (CustomerId, OrderDate)
  • D.Create a nonclustered index on (OrderDate, CustomerId)

Why C: Option D is correct because a nonclustered index on (CustomerId, OrderDate) includes the columns used in the WHERE clause, enabling a seek operation. Option A is wrong because a clustered index on OrderId does not help queries filtering by CustomerId. Option B is wrong because a nonclustered index on (OrderDate, CustomerId) is less selective if OrderDate is high-cardinality. Option C is wrong because partitioning by OrderId does not help queries filtering by CustomerId.

Keep practising

More DP-900 practice questions

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.