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
Last published date
Overview
Some queries may not display EXPLAIN plans, which are essential for understanding query execution details.
Product section
Cause
- Missing Query Samples: EXPLAIN plans require query samples. If samples are not collected, EXPLAIN plans cannot be generated.
- Unpredictable Load: Queries that could cause unpredictable load on the server during EXPLAIN, such as those containing sub-queries, are excluded.
- Permissions: The DBO user must have the necessary permissions to execute EXPLAIN.
- Account Settings: EXPLAIN plans can be disabled by the account administrator.
- 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
- Collect Query Samples: Ensure query samples are collected for the queries you want to analyze.
- Review Query Structure: Avoid using sub-queries that might cause unpredictable load.
- Check Permissions: Verify that the DBO user has the proper permissions to execute EXPLAIN.
- Account Configuration: Confirm that EXPLAIN plans aren't disabled by your account administrator.
- 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.