Bug #26966 | Optimizer does not select range access over ref in some specific cases | ||
---|---|---|---|
Submitted: | 8 Mar 2007 17:27 | Modified: | 7 Sep 2007 9:13 |
Reporter: | Guillaume Lefranc | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 5.0.38-enterprise-gpl-log | OS: | Linux (Ubuntu 6.06 LTS) |
Assigned to: | CPU Architecture: | Any | |
Tags: | column, indexes, multi, Optimizer, range, ref |
[8 Mar 2007 17:27]
Guillaume Lefranc
[24 Mar 2007 5:11]
Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 5.0.36/5.0.37, and inform about the results.
[10 Apr 2007 16:33]
Guillaume Lefranc
Repeated vs. 5.0.38. Optimizer still picks the wrong index.
[4 May 2007 11:01]
Valeriy Kravchuk
Why do you think that wrong index is used? Can you prove that with query execution times? If yes, please, upload the exact data for the table. Have you tried to execute ANALYZE TABLE before running EXPLAINs?
[4 May 2007 12:01]
Guillaume Lefranc
Valeriy, I have posted explain and execution times in the first comment. My point was that the optimizer seems to select its index based on ref over range, not on the number of rows processed. I can update you with more data if needed.
[4 May 2007 16:44]
Valeriy Kravchuk
Please, upload your table data. I was not able to repeat on dumb data I created.
[7 Sep 2007 9:13]
Sveta Smirnova
Thank you for the report. I can not repeat described behaviour with current sources, although problem is repeatable with version 5.0.41. So I'll close the report as "Can't repeat".