[MDEV-29073] Slower query #2 with MDEV-28852 comparing to 10.6 or 10.10 (820 sec vs 0.9 sec) Created: 2022-07-09 Updated: 2022-07-11 Resolved: 2022-07-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | N/A |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
The test uses all default server startup options, loads original data set from
(where tX, cX and 'str' are obfuscated names of tables and columns and a constant from the dataset). On current 10.6, the query takes below 1 sec
On the preview branch for
Note that it's about the actual execution, not about plan selection; on both versions EXPLAIN is nearly instantaneous. The plans are correspondingly
|
| Comments |
| Comment by Sergei Petrunia [ 2022-07-11 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ANALYZE in 10.6
Note tbl1 has r_filtered=0. The filtering is done early. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2022-07-11 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks to SHOW ANALYZE, I don't need to wait till the query finishes on 10.10. The zero-selectivity condition is checked at a later stage:
tbl5 (613 rows) times tbl0 , times tbl1. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2022-07-11 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I think the cause is the same as in |