[teiid-issues] [JBoss JIRA] Commented: (TEIID-1473) Don't batch more rows than is needed when query contains limit but translator does not support limit

Howard Abrams (JIRA) jira-events at lists.jboss.org
Thu Feb 17 13:19:13 EST 2011


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

Howard Abrams commented on TEIID-1473:
--------------------------------------

Completely agree about best practices.

This came up in our project and seemed like something the engine could make a better guess at, so I figured it was worth mentioning and logging even though we are making sure all our translators now implement limit and offset.

Regarding batch size assumptions, doesn't the translator already get the batch size in the ExecutionContext? I would think most "smart" translators would make assumptions based on that size, not their total size. If this enhancement was added, I was assuming the batch size sent in the context could be set to the limit, and therefore the translator would get the hints it needed.

> Don't batch more rows than is needed when query contains limit but translator does not support limit
> ----------------------------------------------------------------------------------------------------
>
>                 Key: TEIID-1473
>                 URL: https://issues.jboss.org/browse/TEIID-1473
>             Project: Teiid
>          Issue Type: Enhancement
>            Reporter: Howard Abrams
>            Assignee: Steven Hawkins
>            Priority: Minor
>
> Teiid shouldn't try to batch more rows than is needed when query contains limit and translator does not support limit.
> For example, say there is a translator that exposes a table "A", but does not support limit.
> select * from A limit 2
> will currently select an entire batch of rows (1024?) from A, instead of just stopping after 2 rows.
> Likewise, if the translator supports neither offset nor limit, and the query contains both, Teiid should not try to batch more that (offset + limit) rows.
> This is marked as "Minor" because the workaround of naively supporting limit and offset within a translator is not too hard.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the teiid-issues mailing list