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

SQL: co-located query may calculate target partition in advance in some cases

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.8
    • None
    • sql

    Description

      Consider the following SQL query with distributedJoins=false:

      SELECT ... 
      FROM Employee e
          INNER JOIN Department d on d.id = e.dept_id
      WHERE e.dept_id = ?
      

      If dept_id is affinity key, and this should be certainly so in case of non-colocated joins (otherwise query will return incorrect result), then we can do the following:
      1) Determine partition for this affinity key.
      2) Send query execution request to this partition only.

      Same technique can be applied to WHERE e.dept_id IN (?, ...) case.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vozerov Vladimir Ozerov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: