Observability

SolarWinds Observability - Queries Missing Explain Plans

When looking at queries, if you're not seeing EXPLAIN plans for some or all of your queries.

First published date

5/8/2025 3:32 PM

Last published date

5/8/2025 3:32 PM

Overview

Some queries may not display EXPLAIN plans, which are essential for understanding query execution details.

Product section

SolarWinds Observability

Cause

  1. Missing Query Samples: EXPLAIN plans require query samples. If samples are not collected, EXPLAIN plans cannot be generated.
  2. Unpredictable Load: Queries that could cause unpredictable load on the server during EXPLAIN, such as those containing sub-queries, are excluded.
  3. Permissions: The DBO user must have the necessary permissions to execute EXPLAIN.
  4. Account Settings: EXPLAIN plans can be disabled by the account administrator.
  5. Slow EXPLAINs: When running EXPLAINs are taking too long, the agents may not send the EXPLAIN when too many queries are in the backlog waiting for EXPLAINs.

Resolution

  1. Collect Query Samples: Ensure query samples are collected for the queries you want to analyze.
  2. Review Query Structure: Avoid using sub-queries that might cause unpredictable load.
  3. Check Permissions: Verify that the DBO user has the proper permissions to execute EXPLAIN.
  4. Account Configuration: Confirm that EXPLAIN plans aren't disabled by your account administrator.
  5. Increase the Number of Queries in the Buffer: First take a look at the metric dbo.plugins.dbo_mysql_metrics.samples.skipped_explain_count to see if the agents are skipping EXPLAINs. If they are, you can add this "max-explain-backlog": "10" to the dbo-global.conf file to increase the number of queries in the backlog. The default value is 10 and has a max of 20.