Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-5703

Pushing sorted limit should reuse interesting order

    XMLWordPrintable

Details

    • Quality Risk
    • Resolution: Unresolved
    • Major
    • Backlog
    • None
    • Query Engine
    • None

    Description

      When an order limit is pushed:

      select ... from a left outer join b ... order by a.x limit 10

      we effectively create

      select ... from (select ... from a order by a.x limit 10 ) as a left outer join b ... order by a.x limit 10

      such that the order and limit is reapplied. In many cases the order by is the same as rows contained in the join predicate, or we can use a hash/index of the inner side such that the order of the outer remains stable. It's a smaller issue, but it's possible that the higher level limit is also not necessary - if there can only be 0-1 inner rows per outer.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-engineering-shawkins Steven Hawkins
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: