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

Performance SQL with distinct in subquery

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.4
    • None
    • sql
    • None

    Description

      A query with distinct in subquery executes much slower in non-local mode than local mode.
      For example we have "person table" with 200000 rows.
      The following query executes at 5ms in local mode, and at 75ms at non local mode.

      select * from
      (select distinct p.id from "Person".Person p left join "Company".Company c on p.companyId=c.id
      where p.name='John' or c.name='Company2') p
      join "Department".Department d on d.id=p.id

      The peproducer project is attached.

      Attachments

        1. ignite-8284.zip
          4 kB
          Pavel Vinokurov

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pvinokurov Pavel Vinokurov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: