[MDEV-26881] Selects and Updates with huge fixed set in where clause performs well in 5.5 master, poorly in 10.5 slave Created: 2021-10-21 Updated: 2022-01-06 Resolved: 2021-11-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | None |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Edward Stoever | Assignee: | Sergei Petrunia |
| Resolution: | Cannot Reproduce | Votes: | 1 |
| Labels: | None | ||
| Description |
|
EXPLAIN select * from mytable where userid IN (<fixed set of 10000 integers>);
10.5 EXPLAIN
Have tried with eq_range_index_dive_limit = 12000 and eq_range_index_dive_limit = 0, no difference in performance. Have tried SET optimizer_switch='extended_keys=on,rowid_filter=on';, no difference in performance. |
| Comments |
| Comment by Sergei Petrunia [ 2021-10-26 ] |
|
The provided EXPLAIN looks like a reasonable plan. Its execution speed should not be much different from the 5.5's EXPLAIN (lines 1, 3, and 4 look like extra work but actually they are not - MariaDB 5.5 will do nearly the same: sort IN-list, remove duplicates, then use it to make lookups into table mytable. |
| Comment by Sergei Petrunia [ 2021-11-25 ] |
|
Closing as cannot reproduce. Feel free to re-open if the issue is observed [again]. |