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

Improve behaviour for non-correlated subqueries

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Reopened
    • Minor
    • Resolution: Won't Fix
    • 2.3
    • None
    • sql
    • None

    Description

      Ignite behaves poorly in terms of performance when given queries which contain IN or = operators followed by a non-correlated subquery. My guess is that the query is actually run for each row of the table in order to test the condition.
      A possible solution is to store the results of the subquery in a temporary table, and use it from there.
      A workaround at the moment is to use joins instead of IN or = operators, but this makes the query much more complicated.

      Example:
      SELECT name
      FROM Employees
      WHERE age IN (SELECT age FROM Customers)

      The performance of this query is very slow for small amounts of data (about 20 seconds for 4000 rows in each table last time I tried)

      Attachments

        Activity

          People

            Unassigned Unassigned
            coroalin Alin Andrei Corodescu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: