[MDEV-28928] Plan selection takes 2+ times longer than before MDEV-28852 Created: 2022-06-22 Updated: 2022-07-20 Resolved: 2022-07-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | N/A |
| Fix Version/s: | 10.10.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
The test uses all default server startup options, loads original data set from The query was executed with EXPLAIN FORMAT=JSON on several different versions/builds for comparison. All builds are non-debug.
With optimizer_prune_level=2 (default) and optimizer_prune_level=1 the time on the above build is approximately the same. So, the fastest is current 10.6 main (maybe it has a fix which isn't yet in 10.10 main). But even 10.10 main is over 2 times faster than preview-10.10-optimizer. For an additional reference (since preview-10.10-optimizer contains two new features),
This ^ is a build with |
| Comments |
| Comment by Michael Widenius [ 2022-06-27 ] |
|
10.6 can for some bad queries be faster than 10.10 with new greedy optimizer enhancements. It all depends on how likely the optimizer finds a good plan. What is important is to optimise for the normal case where most tables has some kind of index that can be used. In this case 10.10-optimizer should be superior in almost all cases. |
| Comment by Elena Stepanova [ 2022-06-28 ] |
|
Adding actual execution time upon monty's request. Same machine, both optimized non-debug builds. The machine is not tuned for precise benchmarking, the numbers are just for a rough comparison. Preview build (preview-10.10-optimizer f332260c9) Baseline build (07a31de10) |
| Comment by Sergei Petrunia [ 2022-07-20 ] |
|
Fixed by fix for |