Bug #1560 | EXPLAIN shows wrong access type for the table | ||
---|---|---|---|
Submitted: | 15 Oct 2003 6:56 | Modified: | 19 Sep 2012 8:18 |
Reporter: | Konstantin Osipov (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 5.1 | OS: | Any (all) |
Assigned to: | Evgeny Potemkin | CPU Architecture: | Any |
[15 Oct 2003 6:56]
Konstantin Osipov
[9 Dec 2003 7:42]
Konstantin Osipov
the problem is that we change filesort to index scan in the last moment in mysql_select. Seems to be necessary to change how explain works significantly to fix the bug. Note that SQL_CALC_FOUND_ROWS now should force filesort, so proper query to spot bug should be SELECT race_name FROM races WHERE race_name LIKE'%Madison%' ORDER BY race_date DESC LIMIT 0,100;
[10 Dec 2003 20:44]
Michael Widenius
Bug is in 4.0 but becasue of the big change required to fix this we will look at fixing this in the 4.1.x series instead
[29 Jan 2004 6:50]
Konstantin Osipov
Please don't reassign this bug. We can't fix it easily, to fix it we need to redesign EXPLAIN processing.
[19 Sep 2012 8:18]
Evgeny Potemkin
Fixed by wl5558.
[16 Feb 2017 14:03]
Paul DuBois
Noted in 5.6.5 changelog. Reporting of how to sort a result set in EXPLAIN has been improved for some statements. This sorting decision could be reported incorrectly, causing Using filesort or Using temporary to be reported when they should not have been or vice versa. This could occur for statements that included index hints, that had the form SELECT SQL_BIG_RESULT ... GROUP BY, that used SQL_CALC_FOUND_ROWS with LIMIT, or that used GROUP BY, ORDER BY, and LIMIT.