Bug #11413 Merge Tables, Analize Table and Optomizer
Submitted: 17 Jun 2005 11:48 Modified: 23 Jul 2005 13:08
Reporter: Nick Meanley Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:4.1.10 OS:Linix
Assigned to: CPU Architecture:Any

[17 Jun 2005 11:48] Nick Meanley
Description:
If I perform an Analize table on a sub table of a Merge Table then the Optomizer fials to use the correct index in a query.  If I then perform an Analize Table on the Master table then the Analize function reports it doesn't support Merge tables BUT DOES ACTUALLY fix the problem.

How to repeat:
+----+-------------+--------------+------+-------------------+-----------+---------+-------------------------+----------+----------------------------------------------+
| id | select_type | table        | type | possible_keys     | key       | key_len | ref                     | rows     | Extra                                        |
+----+-------------+--------------+------+-------------------+-----------+---------+-------------------------+----------+----------------------------------------------+
|  1 | SIMPLE      | Members      | ref  | PRIMARY,AccountNo | AccountNo |       9 | const                   |        7 | Using where; Using temporary; Using filesort |
|  1 | SIMPLE      | Cards        | ref  | PRIMARY,MemberNo  | MemberNo  |       9 | texaco.Members.MemberNo |        2 | Using where                                  |
|  1 | SIMPLE      | Transactions | ALL  | CardNo            | NULL      |    NULL | NULL                    | 12854337 | Using where                                  |
+----+-------------+--------------+------+-------------------+-----------+---------+-------------------------+----------+----------------------

+---------------------+---------+----------+----------------------------------------------------------+
| Table               | Op      | Msg_type | Msg_text                                                 |
+---------------------+---------+----------+----------------------------------------------------------+
| texaco.Transactions | analyze | note     | The storage engine for the table doesn't support analyze |
+---------------------+---------+----------+----------------------------------------------------------+

+----+-------------+--------------+------+-------------------+-----------+---------+-------------------------+------+----------------------------------------------+
| id | select_type | table        | type | possible_keys     | key       | key_len | ref                     | rows | Extra                                        |
+----+-------------+--------------+------+-------------------+-----------+---------+-------------------------+------+----------------------------------------------+
|  1 | SIMPLE      | Members      | ref  | PRIMARY,AccountNo | AccountNo |       9 | const                   |    7 | Using where; Using temporary; Using filesort |
|  1 | SIMPLE      | Cards        | ref  | PRIMARY,MemberNo  | MemberNo  |       9 | texaco.Members.MemberNo |    2 | Using where                                  |
|  1 | SIMPLE      | Transactions | ref  | CardNo            | CardNo    |      20 | texaco.Cards.CardNo     |  344 |                                              |
+----+-------------+--------------+------+-------------------+-----------+---------+-------------------------+------+----------------------------------------------+
[23 Jun 2005 13:08] Aleksey Kishkin
could you please provide tables definitions and query you tested?
[23 Jul 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".