[MDEV-12359] TPC-C query regression using 'derived_merge=on' Created: 2017-03-24 Updated: 2017-05-11 Resolved: 2017-05-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.1.22, 10.2 |
| Fix Version/s: | 5.5.57 |
| Type: | Bug | Priority: | Major |
| Reporter: | VAROQUI Stephane | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
if only running the inner query it gives without outer count
now i just count this and the plan
now disabling derived_merge goes back to regular plan
|
| Comments |
| Comment by Elena Stepanova [ 2017-05-01 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I've attached a data dump which allows to reproduce the described problem. The data is completely artificial, but the structures are taken from some benchmarksql I found online, I assume they're the same.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2017-05-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elena, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-05-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
igor, I think by "regression" stephane@skysql.com meant that the query behaves worse with (default) derived_merge=on than without it, not that there is a difference between versions; but I'll leave it to him to clarify that. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2017-05-11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
After the fix for the bugs mdev-12670, mdev-12675 we have in 5.5:
Now I turn off derived_merge and see that the execution plan for the SELECT specifying the derived table L remains the same:
To simulate the behaviour before the patch for the bug mdev-12670 I have to turn the flag 'semijoin' off:
So I close this mdev as resolved by the patch for the bug mdev-12670. |