Courseiva

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

You manage an Azure SQL Database that hosts a reporting workload. Users report that a monthly aggregation query sometimes completes in 2 seconds, but other times takes over 60 seconds, even though the underlying data volume is unchanged. Query Store shows the query has two distinct plans, and the faster plan is not always chosen. You need to force the faster plan for this query. What should you do?

⚠ Common exam trap

The trap here is assuming that automatic tuning FORCE_LAST_GOOD_PLAN will always pick the fastest plan, when it only reverts to the last known good plan after detecting a regression.

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

✓

Use Query Store to force the specific fast plan for the query.

The scenario describes plan variability for a specific query, and Query Store already shows two plans. The most direct and supported way to stabilize performance is to force the faster plan via Query Store. Automatic tuning may help but is not targeted, plan guides with USE PLAN are unsupported in Azure SQL Database, and changing cardinality estimation is a broad change that does not guarantee the desired plan.

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 plan guide using sp_create_plan_guide with the OPTION (USE PLAN) hint.

    Why it's wrong here

    sp_create_plan_guide with USE PLAN is not supported in Azure SQL Database. While plan guides are available in some SQL Server and Azure SQL Managed Instance contexts, Azure SQL Database does not support the USE PLAN hint in plan guides. Therefore, this approach cannot be used to force the plan in this scenario.

  • ✗

    Enable automatic tuning with the FORCE_LAST_GOOD_PLAN option.

    Why it's wrong here

    Automatic tuning FORCE_LAST_GOOD_PLAN forces the last known good plan when a plan regression is detected, but it cannot target a specific fast plan that you have identified. It relies on regression detection heuristics and may not select the 2-second plan if the regression threshold is not met, so it does not guarantee the desired outcome.

  • ✗

    Enable the LEGACY_CARDINALITY_ESTIMATION database scoped configuration.

    Why it's wrong here

    Changing the cardinality estimation model affects all queries in the database and may produce different plans, but it does not force a specific known-good plan for this query. It could even cause regressions elsewhere. The requirement is to force the faster plan for one query, not to globally alter the optimizer behavior.

  • ✓

    Use Query Store to force the specific fast plan for the query.

    Why this is correct

    Query Store captures all plans for a query and allows you to force a specific plan by plan_id. Forcing the fast plan ensures the optimizer uses that plan regardless of parameter values, eliminating the variability. This is the precise, supported method to stabilize performance for a known-good plan in Azure SQL Database.

Go deeper

Related to this question

About these practice questions

One of 574 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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Microsoft exam blueprint

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.