Bug #35770 Enterprise Monitor does not recognise functionality impossibilities of MySQL 4.x
Submitted: 2 Apr 2008 13:48 Modified: 8 Aug 2008 14:46
Reporter: Bogdan Kecman Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Advisors/Rules Severity:S3 (Non-critical)
Version:1.3 OS:Any
Assigned to: Andy Bang CPU Architecture:Any

[2 Apr 2008 13:48] Bogdan Kecman
Description:
the "adviser" email:

"Turn on the Slow Query Log, and use the --log-queries-not-using-indexes option to log all statements using a full table scan, and then monitor this log file. Statements that are logged there are candidates for tuning. Once you have found tuning candidates, use the EXPLAIN statement on the queries to see which tables should have indexes added to them." 

... now .. if it is MySQL 4.0 - it *does not have* --log-queries-not-using-indexes

How to repeat:
monitor mysql 4.0 with slow query log

Suggested fix:
detect that monitored version of mysql do not have some functionality and fix advice accordingly
[21 May 2008 21:20] Andy Bang
We can't change the advice on the fly based on the server version, so the advice has been changed as follows:

"Turn on the Slow Query Log and monitor what goes into it.  Statements that are logged there are candidates for tuning.  Once you have found tuning candidates, use the EXPLAIN statement on the queries to see which tables should have indexes added to them.  If you are using MySQL 4.1 or later you can use the __--log-queries-not-using-indexes__ option to log all statements that do a full table scan, even if they would not otherwise qualify for the slow query log."

Committed revision 9124.
[4 Jun 2008 15:47] Marcos Palacios
Checked rule "Indexes Not Being Used Efficiently".
Verified fixed in advisor build 1.3.0.9137.
[23 Jul 2008 8:41] Tony Bedford
Set to "verified" with a "target" of 2.0 as requested.

An entry has also been added to the 1.3 changelog:

The Adviser email suggested using the --log-queries-not-using-indexes option. However, this option is not available in MySQL Server versions prior to 4.1.
[29 Jul 2008 21:04] Andy Bang
Pushed up to revision 212.
[6 Aug 2008 20:18] Marcos Palacios
Verified fixed in advisor build 2.0.0.7020.
[8 Aug 2008 14:46] Tony Bedford
Changelog updated accordingly.