Bug #45001 EXPLAIN says "Using index; Using filesort", however table scan is used
| Submitted: | 21 May 2009 6:22 | Modified: | 6 Jul 2009 13:31 |
|---|---|---|---|
| Reporter: | Yuan WANG | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
| Version: | 5.1.33, 4.1, 5.0, 5.1, 6.0 bzr | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[21 May 2009 6:22]
Yuan WANG
[21 May 2009 8:20]
Sveta Smirnova
Thank you for the report. > However after debuging you can find that table scan is used actually. Please provide what exactly did you do: gdb output.
[22 May 2009 1:33]
Yuan WANG
Sorry that I don't use gdb. I use MS VC++ in Windows. However to confirm this is easy. Just set two breakpoints in ha_innobase::rnd_next and ha_innobase::index_next. And you will find that ha_innobase::rnd_next will be hit and ha_innobase::index_next won't.
[25 May 2009 10:09]
Sveta Smirnova
Thank you for the feedback. Verified as described. Problem repeatable with MyISAM as well: just replace ha_innodb with ha_myisam
[27 May 2009 15:42]
Sveta Smirnova
Omer, you are right: problem is not repeatable with more rows.
[6 Jul 2009 13:31]
Sergei Golubchik
So, I presume, it's a [not very serious] bug in explain.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.042 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.