Datadog Database Monitoring Fundamentals free question 6 / 10 · Domain 3: Metrics, Performance, and Query Analysis
A single normalized query shows several explain plans on its Query Details page. How does the page explain this?
- Plans are collected once a day and each host contributes one plan
- Plans are collected once and each database user contributes a plan
- Plans are collected continuously and each distinct plan is shown separately
- Plans are collected continuously and merged into a single plan with averages
Show the answer and explanation
Answer: C
Why this is correct
Datadog collects explain plans continuously, so one query can have several plans over time. The plans are normalized and shown separately, which lets you see whether some plans perform better or have a higher relative cost than others. Selecting a plan shows cost metrics or its JSON.
Why the other options are wrong
"Plans are collected once a day and each host contributes one plan" … The page says explain plans are collected continuously.
"Plans are collected once and each database user contributes a plan" … Plans are collected continuously and normalized, not per user.
"Plans are collected continuously and merged into a single plan with averages" … Plans are shown separately so that better and worse plans can be compared.
Key points
View All Samples for This Plan leads to the Query Samples view for the samples associated with that plan. This is how a plan change is linked to the runs it affected. Comparing plans of one query shows whether a plan change explains a latency change, which is a frequent cause of regressions. The documentation puts it this way: "Datadog collects explain plans continuously, so a given query can have multiple plans. Those plans are normalized and shown separately so that you can see if a query has plans that perform better or have higher relative cost than others."