Steven Hawkins created TEIID-5703:
-------------------------------------
Summary: Pushing sorted limit should reuse interesting order
Key: TEIID-5703
URL:
https://issues.jboss.org/browse/TEIID-5703
Project: Teiid
Issue Type: Quality Risk
Components: Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 12.x
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.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)