[
https://issues.apache.org/jira/browse/IGNITE-4150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16247231#comment-16247231
]
Vladimir Ozerov commented on IGNITE-4150:
-----------------------------------------
Fixed in
https://github.com/h2database/h2database/commit/7ec1dbee0ad6a34906ec172afa5645b983db3b3f
> B-Tree index cannot be used efficiently with IN clause.
> -------------------------------------------------------
>
> Key: IGNITE-4150
> URL: https://issues.apache.org/jira/browse/IGNITE-4150
> Project: Ignite
> Issue Type: Task
> Components: sql
> Affects Versions: 1.7
> Reporter: Vladimir Ozerov
> Labels: performance
> Fix For: 2.4
>
>
> Consider the following query:
> {code}
> SELECT * FROM table
> WHERE a = ? AND b IN (?, ?)
> {code}
> If there is an index {{(a, b)}}, it will not be used properly: only column
> {{a}} will be used. This will leads to multiple unnecessary comparisons.
> Most obvious way to fix that - use temporary table and {{JOIN}}. However,
> this approach doesn't work well when there are multiple {{IN}}'s.
> Proper solution would be to hack deeper into H2.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)