[teiid-issues] [JBoss JIRA] (TEIID-2902) More incremental join when a limit is present

Steven Hawkins (JIRA) issues at jboss.org
Sun Mar 23 08:11:12 EDT 2014


    [ https://issues.jboss.org/browse/TEIID-2902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12955332#comment-12955332 ] 

Steven Hawkins commented on TEIID-2902:
---------------------------------------

So what you are asking for is a grace style join that works incrementally against sorted sublists.  I reworded the issue as it is generally not correct to think of this as pushing the limit as pushing the limit below an inner join could result in less results than desired.

Limit pushing over joins is done in the case of cross joins and on the left side of a left outer join.

Also if the enhanced sort merge join is used and there is a disparity in the sizes of the two sides, then only the smaller side will be fully fetched.  The other side will be processed incrementally.  So there are several cases already when processing is more like what you want.
                
> More incremental join when a limit is present
> ---------------------------------------------
>
>                 Key: TEIID-2902
>                 URL: https://issues.jboss.org/browse/TEIID-2902
>             Project: Teiid
>          Issue Type: Enhancement
>          Components: Query Engine
>    Affects Versions: 8.7
>            Reporter: Ivan Chan
>            Assignee: Steven Hawkins
>
> For SQL like:
> SELECT 
>      t1.column1, 
>      t2.column1
> FROM 
>      schema1.table1 t1, 
>      schema2.table1 t2
> WHERE 
>      t1.column2=t2.column2
> LIMIT 100
> Teiid may get the whole schema1.table1 content and the whole schema2.table1 content, do the join in memory and then, limit the resultset to 100 records.
> However, I think teiid can fetch smaller set of data then do a join.  If the join result set is less than number of rows asking,  keep fetching next set of data and do a join until hits the limit number.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the teiid-issues mailing list