Courseiva

DP-300 Practice Question: Monitor, configure, and optimize database resources

You are responsible for performance tuning of an Azure SQL Database that hosts a customer relationship management (CRM) application. The database has several tables with millions of rows. Users report that a report query that joins four tables is slow. You examine the query execution plan and notice that the database engine is using an Index Spool (Lazy Spool) operator. Which TWO actions should you take to improve query performance? (Choose two.)

⚠ Common exam trap

Many candidates assume an Index Spool is always a performance booster (like a regular index seek) or that increasing hardware resources (Option B) is the quick fix, when in fact the spool is a costly workaround for missing permanent indexes and stale statistics.

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 appropriate indexes on the columns used in joins and filters.

An Index Spool (Lazy Spool) operator in an execution plan indicates that the query engine is creating a temporary index on the fly to support join or filter operations, which is a sign of missing or inadequate permanent indexes. Creating appropriate indexes on the columns used in joins and filters (Option C) eliminates the need for the spool, reducing I/O and improving performance. Updating statistics (Option E) ensures the query optimizer has accurate distribution information to generate efficient plans, which can also help avoid spool operations.

Answer analysis

Option-by-option breakdown

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

  • Disable parallelism for the query using the MAXDOP 1 hint.

    Why it's wrong here

    Disabling parallelism might reduce the spool's cost but does not eliminate it and could slow down other operations.

  • Increase the DTU or vCore count of the database.

    Why it's wrong here

    Adding resources may reduce the impact but does not address the root cause of the spool.

  • Create appropriate indexes on the columns used in joins and filters.

    Why this is correct

    Proper indexing can allow the optimizer to use index seeks instead of scanning and spooling.

  • Rewrite the query using table hints to force a specific join order.

    Why it's wrong here

    Forcing a join order may not eliminate the spool and could cause other performance issues.

  • Update statistics on all tables involved in the query.

    Why this is correct

    Updated statistics improve cardinality estimates, helping the optimizer choose a better plan without spools.

About these practice questions

One of 906 original DP-300 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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-300 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-300 exam.