DP-300 Practice Question: Monitor, configure, and optimize database resources
You are monitoring an Azure SQL Database using dynamic management views (DMVs). You want to identify the top queries by total CPU time over the last hour. Which DMV should you query?
⚠ Common exam trap
DP-300 often tests the distinction between cumulative query statistics (sys.dm_exec_query_stats) and instantaneous or resource-level DMVs — candidates pick sys.dm_db_resource_stats because it mentions 'resource' and sounds like CPU monitoring.
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
✓
sys.dm_exec_query_stats
sys.dm_exec_query_stats exposes cumulative per-plan statistics including total_worker_time, which represents total CPU time consumed by a query plan. Aggregating and ordering by total_worker_time identifies the top CPU-consuming queries. It is the standard DMV for query-level CPU analysis in Azure SQL Database.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
sys.dm_exec_query_stats
Why this is correct
sys.dm_exec_query_stats aggregates cumulative execution statistics per cached query plan, exposing total_worker_time as the CPU metric. Querying it ordered by total_worker_time DESC yields the top CPU-consuming queries, satisfying the requirement to rank queries by total CPU time over the last hour.
- ✗
sys.dm_exec_requests
Why it's wrong here
sys.dm_exec_requests shows only currently executing requests, so queries that finished earlier in the hour are absent and no cumulative CPU total exists. It tempts for live troubleshooting of blocking or long-running statements, where current execution state is exactly what you need.
- ✗
sys.dm_db_index_usage_stats
Why it's wrong here
sys.dm_db_index_usage_stats counts index seeks, scans, lookups and updates, exposing no per-query CPU consumption at all. It tempts when tuning indexes by identifying unused or heavily written indexes, which is an access-pattern question rather than a CPU-ranking one.
- ✗
sys.dm_db_resource_stats
Why it's wrong here
sys.dm_db_resource_stats reports database-level CPU, IO and memory percentages against limits, aggregated per interval, with no query text or per-statement CPU. It tempts for capacity and throttling analysis, where overall resource consumption matters rather than individual query cost.
Go deeper
Related to this question
Learn chapter
Monitoring Database Performance with Azure Tools
Key term
Azure SQL Performance Tuning
Azure SQL Performance Tuning is the process of optimizing the speed and efficiency of queries and database operations in Microsoft Azure SQL Database or SQL Managed Instance to reduce latency and improve throughput.
About these practice questions
This DP-300 question is part of Courseiva's 574-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
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.