Bug #43212 QUAN somtimes doesn't collect example EXPLAIN PLAN
Submitted: 26 Feb 2009 8:30 Modified: 6 Mar 2009 19:54
Reporter: Andrii Nikitin Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S3 (Non-critical)
Version:2.0.4.7141 OS:Any
Assigned to: CPU Architecture:Any

[26 Feb 2009 8:30] Andrii Nikitin
Description:
Sometimes Query Analyzer doesn't collect explain plan.

How to repeat:
1. check that QUAN is configured and enabled
2. for each of following query: 
- run, 
- wait 'exec count' incremented in QUAN, 
- check that explain plan is not collected (message 'EXPLAIN is only captured for queries that take longer than 500 ms'):

select sleep(0.501);
select sleep(0.6);
select sleep(0.7);
select sleep(0.8);

For my idle installation EXPLAIN PLAN starts being collected for exec time ~0.9s, I think for busy agents/servers it may be bigger

select sleep(0.9);

Suggested fix:
not sure
[26 Feb 2009 11:10] Simon Mudd
Suggested fix: probably collect a plan for all slow queries. The plan should be updated periodically as plans may change over time as the data changes.

Another suggestion: enable merlin to trigger a request on the agent to collect a new (or first) plan for any query, and report back later. This would be helpful for collecting plans even on fast queries and avoids you having to login to the db server just to collect it.
[6 Mar 2009 19:54] Mark Leith
This is a duplicate of Bug #42105