Details
-
Task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.7
-
Docs Required
Description
Consider the following query:
SELECT * FROM table WHERE a = ? AND b IN (?, ?)
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.
Attachments
Issue Links
- blocks
-
IGNITE-8639 Query with a lot of nesting causes NPE in org.h2.util.StringUtils.indent
- Resolved
- is depended upon by
-
IGNITE-8716 SQL query and WITH caluse produces syntax error
- Open
- is duplicated by
-
IGNITE-6633 Repair basic SQL functionality
- Closed
- is related to
-
IGNITE-9696 SQL: Remove documentation about bad IN performance
- Resolved
- relates to
-
IGNITE-6085 SQL: JOIN with multiple conditions is extremely slow
- Closed
- links to