Bug #105644 | ranges cannot use indexes on joined tables | ||
---|---|---|---|
Submitted: | 19 Nov 2021 16:22 | Modified: | 22 Nov 2021 13:15 |
Reporter: | Domas Mituzas | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S5 (Performance) |
Version: | 8.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[19 Nov 2021 16:22]
Domas Mituzas
[19 Nov 2021 16:44]
Domas Mituzas
This works on Postgres: test=# explain select count(*) from generate_series(1,1000)a join j using (a) where b=1 and c>900; QUERY PLAN -------------------------------------------------------------------------------------- Aggregate (cost=9063.76..9063.77 rows=1 width=8) -> Nested Loop (cost=0.43..9059.00 rows=1903 width=0) -> Function Scan on generate_series a (cost=0.00..10.00 rows=1000 width=4) -> Index Only Scan using idx on j (cost=0.42..9.03 rows=2 width=4) Index Cond: ((a = a.a) AND (b = 1) AND (c > 900))
[22 Nov 2021 13:15]
MySQL Verification Team
Hi Mr. Mituzas, Thank you for your bug report. We were able to repeat the performance problem that you are reporting. We are verifying this report as a Performance Improvement report. Verified as reported.