[MDEV-8026] use index when IN list contains tuples Created: 2015-04-20 Updated: 2015-10-31 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Jiri Kavalik | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 3 |
| Labels: | upstream-fixed | ||
| Description |
|
When query contains condition on multiple columns using IN list with multiple tuples, it won't use index. If IN contains only single tuple, then optimizer seems to rewrite it into multiple ANDs (can be seen with EXPLAIN EXTENDED). Upstream has it tracked in https://bugs.mysql.com/bug.php?id=31188 and said to be fixed in 5.7.3 Would it be possible to implement such optimization? |
| Comments |
| Comment by Julien Pivotto [ 2015-10-29 ] | ||||||||||||||||||
|
We have found the same behavior with delete and the WHERE clause:
If you use tuples, the delete operation does a full table scan. |