[teiid-issues] [JBoss JIRA] (TEIID-1791) Only the first 1000 items in the IN criteria are being pushed down in the query

Steven Hawkins (Resolved) (JIRA) jira-events at lists.jboss.org
Tue Oct 25 14:26:45 EDT 2011


     [ https://issues.jboss.org/browse/TEIID-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Hawkins resolved TEIID-1791.
-----------------------------------

         Assignee: Steven Hawkins
    Fix Version/s: 7.4.1
                   7.6
       Resolution: Done


The issue is that if there is more than 1 source contributing to a dependent join (which means more than 1 processing node - a join of two tables providing values would be a single source) and the first source can be added completely in a single while a latter source needs more than 1 predicate, then only the first predicate of the latter source is added.

The fix was to correct when the source index was incremented in DependentCriteriaProcessor.
                
> Only the first 1000 items in the IN criteria are being pushed down in the query
> -------------------------------------------------------------------------------
>
>                 Key: TEIID-1791
>                 URL: https://issues.jboss.org/browse/TEIID-1791
>             Project: Teiid
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: 7.4.1
>            Reporter: Debbie Steigner
>            Assignee: Steven Hawkins
>             Fix For: 7.4.1, 7.6
>
>
> In the below query, we are expecting a large number of book codes (46987), to be passed from ledgerbookid in t_sdm_ledgerbook into the TSL_FINANCIAL_ACCOUNT_ITEMS_T2 table. We can see from the query plan that it got the correct number of rows.
> I understand that Oracle can only take 1000 items in an IN() construct, so EDS will split the criteria into multiple sets of 1000 IN criteria. I have seen this work previously.
> It seems that for some reason in this query, possibly the other dependent join or hints, EDS pushes exactly 1000 criteria. Looking at the source specific SQL command in the EDS debug log, which I have attached, I counted the number of question marks in that IN() and it comes to 1000. We have checked that all of these book codes are unique, by doing a select distinct to the source model.
> select cc.costcentreid, cc.description , ac.accountdescription, sum(func_amount)
>   from TSL_FINANCIAL_ACCOUNT_ITEMS_T2 tsl
>   join t_sdm_glaccount ac on tsl.account_code = ac.accountid
>   join /*+ MAKEIND */t_sdm_ledgerbook lb on tsl.book_code = lb.ledgerbookid
>   join /*+ MAKEIND */t_sdm_costcentre cc on lb.parentcostcentreid = cc.costcentreid
>   join /*+ MAKEIND */t_sdm_desk dsk on cc.parentdeskid = dsk.deskid
>   join /*+ MAKEIND */t_sdm_businessarea ba on dsk.parentbusinessareaid = ba.businessareaid
>   join /*+ MAKEIND */t_sdm_division div on ba.parentdivisionid = div.divisionid
>   where tsl.business_date = '2011-06-29'
>   and div.divisionid = 'GBM'
>   and ac.classificationid in (3,4)
> group by  cc.costcentreid, cc.description, ac.accountdescription;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the teiid-issues mailing list