Bug #37680 | optimizer uses huge index scan for order by when ref access is possible | ||
---|---|---|---|
Submitted: | 26 Jun 2008 21:54 | Modified: | 10 Jul 2008 8:09 |
Reporter: | Ruslan Zakirov | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S5 (Performance) |
Version: | 5.1.23 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | index scan, order by, ref |
[26 Jun 2008 21:54]
Ruslan Zakirov
[26 Jun 2008 22:03]
Ruslan Zakirov
Looked closer into mysql's bug tracker. May be bug is related to http://bugs.mysql.com/bug.php?id=36259.
[27 Jun 2008 4:31]
Valeriy Kravchuk
Thank you for a bug report. Looks like a duplicate of bug #36259, indeed.
[27 Jun 2008 11:12]
Ruslan Zakirov
One of users upgraded to mysql 5.1.25 and it has no difference.
[27 Jun 2008 16:54]
Valeriy Kravchuk
OK, then please send the results of SHOW TABLE STATUS for that Attachments table.
[10 Jul 2008 8:09]
Ruslan Zakirov
sorry, but customer already downgraded to older version.
[24 Aug 2008 7:59]
Alan Snelson
I also noticed this issue after an upgrade to MySQL 5.1.26-rc on FreeBSD 7. Interestingly enough if you change the engine on the Attachments table to MyISAM and explain the same query again the correct key (Attachments3) is chosen!.
[24 Aug 2008 8:12]
Alan Snelson
Please find table status for Attachments *************************** 2. row *************************** Name: Attachments Engine: InnoDB Version: 10 Row_format: Compact Rows: 820884 Avg_row_length: 3588 Data_length: 2945449984 Max_data_length: 0 Index_length: 14712832 Data_free: 7168 Auto_increment: 458426 Create_time: 2008-08-24 09:11:50 Update_time: NULL Check_time: NULL Collation: utf8_general_ci Checksum: NULL Create_options: Comment:
[30 Oct 2009 0:49]
James Day
This is a duplicate of bug #45828 that is included in 5.1.37, 5.4.2 .
[30 Oct 2009 0:50]
James Day
This is a duplicate of bug #45828 that is fixed in 5.1.37, 5.4.2 .