Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-4150

B-Tree index cannot be used efficiently with IN clause.

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 2.7
    • Component/s: sql
    • Labels:
    • Ignite Flags:
      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

            Activity

              People

              • Assignee:
                tledkov-gridgain Taras Ledkov
                Reporter:
                vozerov Vladimir Ozerov
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: