QuestionQ92

VerifiedSecure, optimize, and deploy database solutions

You have an Azure SQL database named SalesDB with Query Store enabled. SalesDB supports an AI-driven product search API.

Users report that API latency rose immediately after deployment and has remained high.

You need to determine whether an execution-plan regression caused the latency increase and, if it did, choose the corrective action that restores an earlier plan. The solution must not require changes to the API code.

What should you use? Each tool may be used once, more than once, or not at all.

Drag & Drop
To identify long-running queries:
To verify that the query has multiple persisted plans over time:
To restore a previous plan without changing the code:
Explanation

Query Performance Insight aggregates Query Store data into charts of top queries by duration/CPU, making it the tool used to identify long-running queries. The Query Store plan store retains every distinct execution plan Query Store has captured for a query over time, so checking it (e.g., via the Tracked Queries or plan comparison views) verifies whether a query has multiple persisted plans, which is the signature of a plan-choice regression. Once a regression is confirmed, plan forcing in Query Store lets an administrator pin an earlier, better-performing plan for future executions without touching the application or query code, directly restoring performance after a plan-related latency spike.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!