[MDEV-298] SHOW EXPLAIN: Plan returned by SHOW EXPLAIN only contains 'Using temporary' while the standard EXPLAIN says 'Using temporary; Using filesort' Created: 2012-05-29 Updated: 2012-07-27 Resolved: 2012-07-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 10.0.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
EXPLAIN SELECT a FROM t1 GROUP BY a;
SHOW EXPLAIN FOR 2;
bzr version-info
Reproducible with the standard optimizer_switch as well as with all OFF values.
|
| Comments |
| Comment by Sergei Petrunia [ 2012-06-04 ] | ||||||||||||||||||||||||||||||||
|
to build a reliable mysql-test testcase, one needs: | ||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2012-07-19 ] | ||||||||||||||||||||||||||||||||
|
In JOIN::exec(), it passes the if-branch shown above (without taking it); It gets into
piece right below; do_select() runs the join, the results are piped into a Then, we reach this part of the code (denote it [part1]):
Then we arrive to this call:
Then reach this (denote [part3]):
And here, create_sort_index() calls test_if_skip_sort_order(), which determines The important take-away is: when we are executing the join in [part1], we do (Q: in this particular example, the result is obvious? Can we fix that? Asking | ||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2012-07-19 ] | ||||||||||||||||||||||||||||||||
|
On the other hand... We've got the "Using temporary" part correctly. Now, if (this is because the server is not capable of using temptable's index for |