1 2 Previous Next 16 Replies Latest reply on Nov 25, 2010 4:58 AM by wpernath Go to original post
      • 15. Re: Salesforce integration: Performance problems with multiple JOINs
        wpernath

        Steve,

         

        thanks a lot for fixing  https://jira.jboss.org/browse/TEIID-1361. IN does now work as expected.

         

        Cheers,

          Wanja

        • 16. Re: Salesforce integration: Performance problems with multiple JOINs
          wpernath

          TEIID-1362 has been resolved. I've tested it and it just works. Performance wise it is really good.

           

          A select like this:

          select  (select Name from general.salesforce.User where id = o.OwnerId) as OpportunityOwner, 
          o.name,
          oli.quantity, oli.totalprice, oli.sybamount, oli.oybamount,
          p.Name as ProductName, p.ProductCode, p.Family as ProductFamily, p.PrimaryBusinessUnit, p.ProductLine, p.UnitOfMeasure
          from   general.salesforce.Opportunity o
          LEFT OUTER JOIN general.salesforce.OpportunityLineItem oli ON o.id = oli.OpportunityId,
          general.salesforce.PricebookEntry pbe,
          general.salesforce.Product2 p
          where 1=1 
          and   oli.PricebookEntryId = pbe.Id
          AND   p.Id = pbe.Product2Id
          and   o.Fiscal = '2011 3'
          and   o.RegionOfOrder = 'CE'

           

          select  (select Name from general.salesforce.User where id = o.OwnerId) as OpportunityOwner, 

          o.name,

          oli.quantity, oli.totalprice, oli.sybamount, oli.oybamount,

          p.Name as ProductName, p.ProductCode, p.Family as ProductFamily, p.PrimaryBusinessUnit, p.ProductLine, p.UnitOfMeasure

          from   general.salesforce.Opportunity o

          LEFT OUTER JOIN general.salesforce.OpportunityLineItem oli ON o.id = oli.OpportunityId,

          general.salesforce.PricebookEntry pbe,

          general.salesforce.Product2 p

          where 1=1 

          and   oli.PricebookEntryId = pbe.Id

          AND   p.Id = pbe.Product2Id

          and   o.Fiscal = '2011 3'

          and   o.RegionOfOrder = 'CE'

          and   o.OwnerId = (select id from general.salesforce.User where name = 'xyz')
          now returns within milliseconds. Before the fix it took ages!
          Thanks a lot for your good work!
          Cheers,
            Wanja

          1 2 Previous Next