How to eliminate joins to improve performance

i have a query:
from D236OT00.ASN1_COMP_NB CP LEFT OUTER JOIN D236OT00.NB01_COMP_DEP_NB CD
     on(CP.SRVC_LOC_ID = CD.CHLD_SRVC_LOC_ID
          and CP.ORD_ITEM_ID = CD.CHLD_ORD_ITEM_ID
          and CP.PRMRY_COMP_CD = CD.CHLD_PRMRY_COMP_CD
          and CP.SECNDRY_COMP_CD = CD.CHLD_SCN_COMP_CD
     and CP.ORD_ITEM_SEQ = CD.CHLD_ORD_ITEM_SEQ
          and CD.DEP_TYPE_CD = 'HI'
          and CD.RECORD_EFF_END_DT = '9999-12-31'
          and CD.EFF_END_DT > CURRENT DATE)
LEFT OUTER JOIN D236OT00.ASN2_RESOURCE_NB RS
on(CP.ORD_ITEM_ID = RS.ORD_ITEM_ID
          and CP.ORD_ITEM_SEQ = RS.ORD_ITEM_SEQ
          and CP.PRMRY_COMP_CD = RS.PRMRY_COMP_CD
          and CP.SECNDRY_COMP_CD = RS.SECNDRY_COMP_CD
          and RS.RECORD_EFF_END_DT = '9999-12-31'
          and RS.RESR_EFF_END_DT > CURRENT DATE)
LEFT OUTER JOIN D236OT00.CSTI_CUST_INFO_MP CS
on(RS.OWNER_ACCT_ID = CS.OWNER_ACCT_ID
          and RS.OWNER_SRVC_LOC_ID = CS.OWNER_SRVC_LOC_ID
          and RS.RESR_ID = CS.RESR_ID and RS.RESR_GRP_TYP = CS.RESR_GRP_TYP
          and RS.RESR_TYPE = CS.RESR_TYPE and CS.START_NBR = ''
          and CS.EFF_END_DT = '9999-12-31' and CS.RATE_END_EFF_DATE = '9999-12-31')
where CP.ORD_ITEM_ID = ? and CP.ORD_ITEM_SEQ = ? and CP.PRMRY_COMP_CD = ? and
CP.RECORD_EFF_END_DT = '9999-12-31' and CP.EFF_END_DT > CURRENT DATE
it has quite a few joins... any way to eliminate these joins to improve performance? Kindly help as this is urgent

from D236OT00.ASN1_COMP_NB CP LEFT OUTER JOIN D236OT00.NB01_COMP_DEP_NB CD
on(CP.SRVC_LOC_ID = CD.CHLD_SRVC_LOC_ID
and CP.ORD_ITEM_ID = CD.CHLD_ORD_ITEM_ID
and CP.PRMRY_COMP_CD = CD.CHLD_PRMRY_COMP_CD
and CP.SECNDRY_COMP_CD = CD.CHLD_SCN_COMP_CD
and CP.ORD_ITEM_SEQ = CD.CHLD_ORD_ITEM_SEQ
and CD.DEP_TYPE_CD = 'HI'
and CD.RECORD_EFF_END_DT = '9999-12-31'
and CD.EFF_END_DT > CURRENT DATE)
LEFT OUTER JOIN D236OT00.ASN2_RESOURCE_NB RS
on(CP.ORD_ITEM_ID = RS.ORD_ITEM_ID
and CP.ORD_ITEM_SEQ = RS.ORD_ITEM_SEQ
and CP.PRMRY_COMP_CD = RS.PRMRY_COMP_CD
and CP.SECNDRY_COMP_CD = RS.SECNDRY_COMP_CD
and RS.RECORD_EFF_END_DT = '9999-12-31'
and RS.RESR_EFF_END_DT > CURRENT DATE)
LEFT OUTER JOIN D236OT00.CSTI_CUST_INFO_MP CS
on(RS.OWNER_ACCT_ID = CS.OWNER_ACCT_ID
and RS.OWNER_SRVC_LOC_ID = CS.OWNER_SRVC_LOC_ID
and RS.RESR_ID = CS.RESR_ID and RS.RESR_GRP_TYP = CS.RESR_GRP_TYP
and RS.RESR_TYPE = CS.RESR_TYPE and CS.START_NBR = ''
and CS.EFF_END_DT = '9999-12-31' and CS.RATE_END_EFF_DATE = '9999-12-31')
where CP.ORD_ITEM_ID = ? and CP.ORD_ITEM_SEQ = ? and CP.PRMRY_COMP_CD = ? and
CP.RECORD_EFF_END_DT = '9999-12-31' and CP.EFF_END_DT > CURRENT DATEYou have not used tags.
it has quite a few joins... any way to eliminate these joins to improve performance? Kindly help as this is urgentBy saying urgent you have lost 99% of points for the volunteer to answer. This is considered as rude.
Your query is incomplete. There is no database version, no os version.
Where is your research? How do you came to that conculsion? Where is the explain plan?
I think you have to repost along with the complete details.
Thank you.

Similar Messages

  • Alternate for inner join to improve performance

    Hi all,
    I have used an inner join query to fetch data from five different tables into an internal table with where clause conditions.
    The execution time is almost 5-6 min for this particular query(I have more data in all five DB tables- more than 10 million records in every table).
    Is there any alternate for inner join to improve performance.?
    TIA.
    Regards,
    Karthik

    Hi All,
    Thanks for all your interest.
    SELECT  a~object_id a~description a~descr_language
                a~guid AS object_guid a~process_type
                a~changed_at
                a~created_at AS created_timestamp
                a~zzorderadm_h0207 AS cpid
                a~zzorderadm_h0208 AS submitter
                a~zzorderadm_h0303 AS cust_ref
                a~zzorderadm_h1001 AS summary
                a~zzorderadm_h1005 AS summary_uc
                a~zzclose_date     AS clsd_date
                d~stat AS status
                f~priority
                FROM crmd_orderadm_h AS a INNER JOIN crmd_link AS b ON  a~guid = b~guid_hi
                INNER JOIN crmd_partner AS c ON b~guid_set = c~guid
                INNER JOIN crm_jest AS d ON objnr  = a~guid
                INNER JOIN crmd_activity_h AS f ON f~guid = a~guid
                INTO CORRESPONDING FIELDS OF TABLE et_service_request_list
                WHERE process_type IN lt_processtyperange
                AND   a~created_at IN lt_daterange
                AND   partner_no IN lr_partner_no
                AND   stat IN lt_statusrange
                AND   object_id IN lt_requestnumberrange
                AND   zzorderadm_h0207 IN r_cpid
                AND   zzorderadm_h0208 IN r_submitter
                AND   zzorderadm_h0303 IN r_cust_ref
                AND   zzorderadm_h1005 IN r_trans_desc
                AND   d~inact = ' '
                AND   b~objtype_hi = '05'
                AND   b~objtype_set = '07'.
                f~priority
                FROM crmd_orderadm_h AS a INNER JOIN crmd_link AS b ON  a~guid = b~guid_hi
                INNER JOIN crmd_partner AS c ON b~guid_set = c~guid
                INNER JOIN crm_jest AS d ON objnr  = a~guid
                INNER JOIN crmd_activity_h AS f ON f~guid = a~guid
                INTO CORRESPONDING FIELDS OF TABLE et_service_request_list
                WHERE process_type IN lt_processtyperange
                AND   a~created_at IN lt_daterange
                AND   partner_no IN lr_partner_no
                AND   stat IN lt_statusrange
                AND   object_id IN lt_requestnumberrange
                AND   zzorderadm_h0207 IN r_cpid
                AND   zzorderadm_h0208 IN r_submitter
                AND   zzorderadm_h0303 IN r_cust_ref
                AND   zzorderadm_h1005 IN r_trans_desc
                AND   d~inact = ' '
                AND   b~objtype_hi = '05'
                AND   b~objtype_set = '07'.

  • How to improve performance of the attached query

    Hi,
    How to improve performance of the below query, Please help. also attached explain plan -
    SELECT Camp.Id,
    rCam.AccountKey,
    Camp.Id,
    CamBilling.Cpm,
    CamBilling.Cpc,
    CamBilling.FlatRate,
    Camp.CampaignKey,
    Camp.AccountKey,
    CamBilling.billoncontractedamount,
    (SUM(rCam.Impressions) * 0.001 + SUM(rCam.Clickthrus)) AS GR,
    rCam.AccountKey as AccountKey
    FROM Campaign Camp, rCamSit rCam, CamBilling, Site xSite
    WHERE Camp.AccountKey = rCam.AccountKey
    AND Camp.AvCampaignKey = rCam.AvCampaignKey
    AND Camp.AccountKey = CamBilling.AccountKey
    AND Camp.CampaignKey = CamBilling.CampaignKey
    AND rCam.AccountKey = xSite.AccountKey
    AND rCam.AvSiteKey = xSite.AvSiteKey
    AND rCam.RmWhen BETWEEN to_date('01-01-2009', 'DD-MM-YYYY') and
    to_date('01-01-2011', 'DD-MM-YYYY')
    GROUP By rCam.AccountKey,
    Camp.Id,
    CamBilling.Cpm,
    CamBilling.Cpc,
    CamBilling.FlatRate,
    Camp.CampaignKey,
    Camp.AccountKey,
    CamBilling.billoncontractedamount
    Explain Plan :-
    Description Object_owner Object_name Cost Cardinality Bytes
    SELECT STATEMENT, GOAL = ALL_ROWS 14 1 13
    SORT AGGREGATE 1 13
    VIEW GEMINI_REPORTING 14 1 13
    HASH GROUP BY 14 1 103
    NESTED LOOPS 13 1 103
    HASH JOIN 12 1 85
    TABLE ACCESS BY INDEX ROWID GEMINI_REPORTING RCAMSIT 2 4 100
    NESTED LOOPS 9 5 325
    HASH JOIN 7 1 40
    SORT UNIQUE 2 1 18
    TABLE ACCESS BY INDEX ROWID GEMINI_PRIMARY SITE 2 1 18
    INDEX RANGE SCAN GEMINI_PRIMARY SITE_I0 1 1
    TABLE ACCESS FULL GEMINI_PRIMARY SITE 3 27 594
    INDEX RANGE SCAN GEMINI_REPORTING RCAMSIT_I 1 1 5
    TABLE ACCESS FULL GEMINI_PRIMARY CAMPAIGN 3 127 2540
    TABLE ACCESS BY INDEX ROWID GEMINI_PRIMARY CAMBILLING 1 1 18
    INDEX UNIQUE SCAN GEMINI_PRIMARY CAMBILLING_U1 0 1

    duplicate thread..
    How to improve performance of attached query

  • How to improve performance of attached query

    Hi,
    How to improve performance of the below query, Please help. also attached explain plan -
    SELECT Camp.Id,
    rCam.AccountKey,
    Camp.Id,
    CamBilling.Cpm,
    CamBilling.Cpc,
    CamBilling.FlatRate,
    Camp.CampaignKey,
    Camp.AccountKey,
    CamBilling.billoncontractedamount,
    (SUM(rCam.Impressions) * 0.001 + SUM(rCam.Clickthrus)) AS GR,
    rCam.AccountKey as AccountKey
    FROM Campaign Camp, rCamSit rCam, CamBilling, Site xSite
    WHERE Camp.AccountKey = rCam.AccountKey
    AND Camp.AvCampaignKey = rCam.AvCampaignKey
    AND Camp.AccountKey = CamBilling.AccountKey
    AND Camp.CampaignKey = CamBilling.CampaignKey
    AND rCam.AccountKey = xSite.AccountKey
    AND rCam.AvSiteKey = xSite.AvSiteKey
    AND rCam.RmWhen BETWEEN to_date('01-01-2009', 'DD-MM-YYYY') and
    to_date('01-01-2011', 'DD-MM-YYYY')
    GROUP By rCam.AccountKey,
    Camp.Id,
    CamBilling.Cpm,
    CamBilling.Cpc,
    CamBilling.FlatRate,
    Camp.CampaignKey,
    Camp.AccountKey,
    CamBilling.billoncontractedamount
    Explain Plan :-
    Description Object_owner Object_name Cost Cardinality Bytes
    SELECT STATEMENT, GOAL = ALL_ROWS 14 1 13
    SORT AGGREGATE 1 13
    VIEW GEMINI_REPORTING 14 1 13
    HASH GROUP BY 14 1 103
    NESTED LOOPS 13 1 103
    HASH JOIN 12 1 85
    TABLE ACCESS BY INDEX ROWID GEMINI_REPORTING RCAMSIT 2 4 100
    NESTED LOOPS 9 5 325
    HASH JOIN 7 1 40
    SORT UNIQUE 2 1 18
    TABLE ACCESS BY INDEX ROWID GEMINI_PRIMARY SITE 2 1 18
    INDEX RANGE SCAN GEMINI_PRIMARY SITE_I0 1 1
    TABLE ACCESS FULL GEMINI_PRIMARY SITE 3 27 594
    INDEX RANGE SCAN GEMINI_REPORTING RCAMSIT_I 1 1 5
    TABLE ACCESS FULL GEMINI_PRIMARY CAMPAIGN 3 127 2540
    TABLE ACCESS BY INDEX ROWID GEMINI_PRIMARY CAMBILLING 1 1 18
    INDEX UNIQUE SCAN GEMINI_PRIMARY CAMBILLING_U1 0 1

    duplicate thread..
    How to improve performance of attached query

  • How to preload sound into memory to improve performance?

    Hello all
    I have an application where it needs to play 4 different short wave files on some events. The wave files are small (less then 1 sec each) so they can be preloaded into memory. But I don't really know how to do that.. This is my current code... Performance is really important here, so the faster users can hear the sounds, the better...
    import java.io.*;
    import javax.sound.sampled.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class PlaySound implements ActionListener
         private Clip clip = null;
         public void play(String name)
              if (clip != null)
                   clip.stop();
                   clip = null;
              loadClip(name);
              clip.start();
         private void loadClip(String fnm)
              try
                   AudioInputStream stream = AudioSystem.getAudioInputStream(new File(fnm + ".wav"));
                   AudioFormat format = stream.getFormat();
                   DataLine.Info info = new DataLine.Info(Clip.class, format);
                   if (!AudioSystem.isLineSupported(info))
                        JOptionPane.showMessageDialog(null, "Unsupported sound line", "Warning!", JOptionPane.WARNING_MESSAGE);
                   else
                        clip = (Clip) AudioSystem.getLine(info);
                        clip.open(stream);
                        stream.close();
              catch (Exception e)
                   JOptionPane.showMessageDialog(null, "loadClip E: " + e.toString(), "Warning!", JOptionPane.WARNING_MESSAGE);
         public static void main(String[] args)
              play("a wav file name");
    }     I would appreciate it if someone can point out how I can preload them to improve performance... Thanks in advance!

    The message above should be:
    OMG, me dumb you smart Florian...
    Thank you for your suggestion... It's not the best OR anything close to what I thought it would be, it's certainly one way to do it and better then what I've got now...
    Thanks again Florian, I really appreciate it!!
    BTW, is there anything that would produce the sound faster then this?
    Message was edited by:
    BuggyVB

  • How to improve performance of MediaPlayer?

    I tried to use the MediaPlayer with a On2 VP6 flv movie.
    Showing a video with a resolution of 1024x768 works.
    Showing a video with a resolution of 1280x720 and a average bitrate of 1700 kb/s leads to a delay of the video signal behind the audio signal of a couple of seconds. VLC, Media Player Classic and a couple of other players have no problem with the video. Only the FX MediaPlayer shows a poor performance.
    Additionally mouse events in a second stage (the first stage is used for the video) are not processed in 2 of 3 cases. If the MediaPlayer is switched off, the mouse events work reliable.
    Does somebody know a solution for this problems?
    Cheers
    masim

    duplicate thread..
    How to improve performance of attached query

  • How do I improve performance while doing pull, push and delete from Azure Storage Queue

           
    Hi,
    I am working on a distributed application with Azure Storage Queue for message queuing. queue will be used by multiple clients across the clock and thus it is expected that it would be heavily loaded most on the time in usage. business case is typical as in
    it pulls message from queue, process the message then deletes the message from queue. this module also sends back a notification to user indicating process is complete. functions/modules work fine as in they meet the logical requirement. pretty typical queue
    scenario.
    Now, coming to the problem statement. since it is envisaged that the queue would be heavily loaded most of the time, I am pushing towards to speed up processing of the overall message lifetime. the faster I can clear messages, the better overall experience
    it would be for everyone, system and users.
    To improve on performance I did multiple cycles for performance profiling and then improving on the identified "HOT" path/function.
    It all came down to a point where only the Azure Queue pull and delete are the only two most time consuming calls outside. I can further improve on pull, which i did by batch pulling 32 message at a time (which is the max message count i can pull from Azure
    queue at once at the time of writing this question.), this returned me a favor as in by reducing processing time to a big margin. all good till this as well.
    i am processing these messages in parallel so as to improve on overall performance.
    pseudo code:
    //AzureQueue Class is encapsulating calls to Azure Storage Queue.
    //assume nothing fancy inside, vanila calls to queue for pull/push/delete
    var batchMessages = AzureQueue.Pull(32); Parallel.ForEach(batchMessages, bMessage =>
    //DoSomething does some background processing;
    try{DoSomething(bMessage);}
    catch()
    //Log exception
    AzureQueue.Delete(bMessage);
    With this change now, profiling results show that up-to 90% of time is only taken by the Azure Message delete calls. As it is good to delete message as soon as processing is done, i remove it just after "DoSomething" is finished.
    what i need now is suggestions on how to further improve performance of this function when 90% of the time is being eaten up by the Azure Queue Delete call itself? is there a better faster way to perform delete/bulk delete etc?
    with the implementation mentioned here, i get speed of close to 25 messages/sec. Right now Azure queue delete calls are choking application performance. so is there any hope to push it further.
    Does it also makes difference in performance which queue delete call am making? as of now queue has overloaded method for deleting message, one which except message object and another which accepts message identifier and pop receipt. i am using the later
    one here with message identifier nad pop receipt to delete message from queue.
    Let me know if you need any additional information or any clarification in question.
    Inputs/suggestions are welcome.
    Many thanks.

    The first thing that came to mind was to use a parallel delete at the same time you run the work in DoSomething.  If DoSomething fails, add the message back into the queue.  This won't work for every application, and work that was in the queue
    near the head could be pushed back to the tail, so you'd have to think about how that may effect your workload.
    Or, make a threadpool queued delete after the work was successful.  Fire and forget.  However, if you're loading the processing at 25/sec, and 90% of time sits on the delete, you'd quickly accumulate delete calls for the threadpool until you'd
    never catch up.  At 70-80% duty cycle this may work, but the closer you get to always being busy could make this dangerous.
    I wonder if calling the delete REST API yourself may offer any improvements.  If you find the delete sets up a TCP connection each time, this may be all you need.  Try to keep the connection open, or see if the REST API can delete more at a time
    than the SDK API can.
    Or, if you have the funds, just have more VM instances doing the work in parallel, so the first machine handles 25/sec, the second at 25/sec also - and you just live with the slow delete.  If that's still not good enough, add more instances.
    Darin R.

  • How to improve performance of query

    Hi all,
    How to improve performance of query.
    please send :
    [email protected]
    thanks in advance
    bhaskar

    hi
    go through the following links for performance
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
    http://www.asug.com/client_files/Calendar/Upload/ASUG%205-mar-2004%20BW%20Performance%20PDF.pdf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1955ba90-0201-0010-d3aa-8b2a4ef6bbb2

  • How to improve performance of insert statement

    Hi all,
    How to improve performance of insert statement
    I am inserting 1lac records into table it takes around 20 min..
    Plz help.
    Thanx In Advance.

    I tried :
    SQL> create table test as select * from dba_objects;
    Table created.
    SQL> delete from test;
    3635 rows deleted.
    SQL> commit;
    Commit complete.
    SQL> select count(*) from dba_extents where segment_name='TEST';
    COUNT(*)
    4
    SQL> insert /*+ APPEND */ into test select * from dba_objects;
    3635 rows created.
    SQL> commit;
    Commit complete.
    SQL> select count(*) from dba_extents where segment_name='TEST';
    COUNT(*)
    6
    Cheers, Bhupinder

  • How to tune this query for the improve performance ?

    Hi All,
    How to tune this query for the improve performance ?
    select a.claim_number,a.pay_cd,a.claim_occurrence_number,
    case
    when sum(case
    when a.payment_status_cd ='0'
    then a.payment_est_amt
    else 0
    end
    )=0
    then 0
    else (sum(case
    when a.payment_status_cd='0'and a.payment_est_amt > 0
    then a.payment_est_amt
    else 0
    end)
    - sum(case
    when a.payment_status_cd<>'0'
    then a.payment_amt
    else 0
    end))
    end as estimate
    from ins_claim_payment a
    where a.as_of_date between '31-jan-03' and '30-aug-06'
    and ( a.data_source = '25' or (a.data_source between '27' and '29'))
    and substr(a.pay_cd,1,1) IN ('2','3','4','8','9')
    group by a.claim_number, a.pay_cd, a.claim_occurrence_number
    Thank you,
    Mcka

    Mcka
    As well as EXPLAIN PLAN, let us know what proportion of rows are visited by this query. It may be that it is not using a full table scan when it should (or vice versa).
    And of course we'd need to know what indexes are available, and how selective they are for the predicated you have in this query ...
    Regards Nigel

  • How to improve performance of Siebel Configurator

    Hi All,
    We are using Siebel Configurator to model the item structures. We wrote few constraint rules on that. But while launching the configurator it is taking more time to open.
    Even without rules also it is behaving in the same manner.
    Any inputs on this could be highly appreciated
    RAM

    duplicate thread..
    How to improve performance of attached query

  • How to run query in parallel  to improve performance

    I am using ALDSP2.5, My data tables are split to 12 ways, based on hash of a particular column name. I have a query to get a piece of data I am looking for. However, this data is split across the 12 tables. So, even though my query is the same, I need to run it on 12 tables instead of 1. I want to run all 12 queries in parallel instead of one by one, collapse the datasets returned and return it back to the caller. How can I do this in ALDSP ?
    To be specific, I will call below operation to get data:
    declare function ds:SOA_1MIN_POOL_METRIC() as element(tgt:SOA_1MIN_POOL_METRIC_00)*
    src0:SOA_1MIN_POOL_METRIC(),
    src1:SOA_1MIN_POOL_METRIC(),
    src2:SOA_1MIN_POOL_METRIC(),
    src3:SOA_1MIN_POOL_METRIC(),
    src4:SOA_1MIN_POOL_METRIC(),
    src5:SOA_1MIN_POOL_METRIC(),
    src6:SOA_1MIN_POOL_METRIC(),
    src7:SOA_1MIN_POOL_METRIC(),
    src8:SOA_1MIN_POOL_METRIC(),
    src9:SOA_1MIN_POOL_METRIC(),
    src10:SOA_1MIN_POOL_METRIC(),
    src11:SOA_1MIN_POOL_METRIC()
    This method acts as a proxy, it aggregates data from 12 data tables
    src0:SOA_1MIN_POOL_METRIC() get data from SOA_1MIN_POOL_METRIC_00 table
    src1:SOA_1MIN_POOL_METRIC() get data from SOA_1MIN_POOL_METRIC_01 table and so on.
    The data source of each table is different (src0, src1 etc), how can I run these queries in parallel to improve performance?

    Thanks Mike.
    The async function works, from the log, I could see the queries are executed in parallel.
    but the behavior is confused, with same input, sometimes it gives me right result, some times(especially when there are few other applications running in the machine) it throws below exception:
    java.lang.IllegalStateException
         at weblogic.xml.query.iterators.BasicMaterializedTokenStream.deRegister(BasicMaterializedTokenStream.java:256)
         at weblogic.xml.query.iterators.BasicMaterializedTokenStream$MatStreamIterator.close(BasicMaterializedTokenStream.java:436)
         at weblogic.xml.query.runtime.core.RTVariable.close(RTVariable.java:54)
         at weblogic.xml.query.runtime.core.RTVariableSync.close(RTVariableSync.java:74)
         at weblogic.xml.query.iterators.FirstOrderIterator.close(FirstOrderIterator.java:173)
         at weblogic.xml.query.iterators.FirstOrderIterator.close(FirstOrderIterator.java:173)
         at weblogic.xml.query.iterators.FirstOrderIterator.close(FirstOrderIterator.java:173)
         at weblogic.xml.query.iterators.FirstOrderIterator.close(FirstOrderIterator.java:173)
         at weblogic.xml.query.runtime.core.IfThenElse.close(IfThenElse.java:99)
         at weblogic.xml.query.runtime.core.CountMapIterator.close(CountMapIterator.java:222)
         at weblogic.xml.query.runtime.core.LetIterator.close(LetIterator.java:140)
         at weblogic.xml.query.runtime.constructor.SuperElementConstructor.prepClose(SuperElementConstructor.java:183)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.close(PartMatElemConstructor.java:251)
         at weblogic.xml.query.runtime.querycide.QueryAssassin.close(QueryAssassin.java:65)
         at weblogic.xml.query.iterators.FirstOrderIterator.close(FirstOrderIterator.java:173)
         at weblogic.xml.query.runtime.core.QueryIterator.close(QueryIterator.java:146)
         at com.bea.ld.server.QueryInvocation.getResult(QueryInvocation.java:462)
         at com.bea.ld.EJBRequestHandler.executeFunction(EJBRequestHandler.java:346)
         at com.bea.ld.ServerBean.executeFunction(ServerBean.java:108)
         at com.bea.ld.Server_ydm4ie_EOImpl.executeFunction(Server_ydm4ie_EOImpl.java:262)
         at com.bea.dsp.dsmediator.client.XmlDataServiceBase.invokeFunction(XmlDataServiceBase.java:312)
         at com.bea.dsp.dsmediator.client.XmlDataServiceBase.invoke(XmlDataServiceBase.java:231)
         at com.ebay.rds.dao.SOAMetricDAO.getMetricAggNumber(SOAMetricDAO.java:502)
         at com.ebay.rds.impl.NexusImpl.getMetricAggNumber(NexusImpl.java:199)
         at com.ebay.rds.impl.NexusImpl.getMetricAggNumber(NexusImpl.java:174)
         at RDSWS.getMetricAggNumber(RDSWS.jws:240)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:371)
    below is my code example, first I get data from all the 12 queries, each query is enclosed with fn-bea:async function, finally, I do a group by aggregation based on the whole data set, is it possible that the exception is due to some threads are not returned data yet, but the aggregation has started?
    the metircName, serviceName, opname, and $soaDbRequest are simply passed from operation parameters.
    let $METRIC_RESULT :=
            fn-bea:async(
                for $SOA_METRIC in ns20:getMetrics($metricName,$serviceName,$opName,"")
                for $SOA_POOL_METRIC in src0:SOA_1MIN_POOL_METRIC()
                where
                $SOA_POOL_METRIC/SOA_METRIC_ID eq fn-bea:fence($SOA_METRIC/SOA_METRIC_ID)
                and $SOA_POOL_METRIC/CAL_CUBE_ID  ge fn-bea:fence($soaDbRequest/ns16:StartTime)  
                and $SOA_POOL_METRIC/CAL_CUBE_ID lt fn-bea:fence($soaDbRequest/ns16:EndTime )
                and ( $SOA_POOL_METRIC/SOA_SERVICE_ID eq fn-bea:fence($soaDbRequest/ns16:ServiceID)
                   or (0 eq fn-bea:fence($soaDbRequest/ns16:ServiceID)))
                and ( $SOA_POOL_METRIC/POOL_ID eq fn-bea:fence($soaDbRequest/ns16:PoolID)
                   or (0 eq fn-bea:fence($soaDbRequest/ns16:PoolID)))
                and ( $SOA_POOL_METRIC/SOA_USE_CASE_ID eq fn-bea:fence($soaDbRequest/ns16:UseCaseID)
                   or (0 eq fn-bea:fence($soaDbRequest/ns16:UseCaseID)))
                and ( $SOA_POOL_METRIC/ROLE_TYPE eq fn-bea:fence($soaDbRequest/ns16:RoleID)
                   or (-1 eq fn-bea:fence($soaDbRequest/ns16:RoleID)))
                return
                $SOA_POOL_METRIC
               fn-bea:async(for $SOA_METRIC in ns20:getMetrics($metricName,$serviceName,$opName,"")
                for $SOA_POOL_METRIC in src1:SOA_1MIN_POOL_METRIC()
                where
                $SOA_POOL_METRIC/SOA_METRIC_ID eq fn-bea:fence($SOA_METRIC/SOA_METRIC_ID)
                and $SOA_POOL_METRIC/CAL_CUBE_ID  ge fn-bea:fence($soaDbRequest/ns16:StartTime)  
                and $SOA_POOL_METRIC/CAL_CUBE_ID lt fn-bea:fence($soaDbRequest/ns16:EndTime )
                and ( $SOA_POOL_METRIC/SOA_SERVICE_ID eq fn-bea:fence($soaDbRequest/ns16:ServiceID)
                   or (0 eq fn-bea:fence($soaDbRequest/ns16:ServiceID)))
                and ( $SOA_POOL_METRIC/POOL_ID eq fn-bea:fence($soaDbRequest/ns16:PoolID)
                   or (0 eq fn-bea:fence($soaDbRequest/ns16:PoolID)))
                and ( $SOA_POOL_METRIC/SOA_USE_CASE_ID eq fn-bea:fence($soaDbRequest/ns16:UseCaseID)
                   or (0 eq fn-bea:fence($soaDbRequest/ns16:UseCaseID)))
                and ( $SOA_POOL_METRIC/ROLE_TYPE eq fn-bea:fence($soaDbRequest/ns16:RoleID)
                   or (-1 eq fn-bea:fence($soaDbRequest/ns16:RoleID)))
                return
                $SOA_POOL_METRIC
             ... //12 similar queries
            for $Metric_data in $METRIC_RESULT    
            group $Metric_data as $Metric_data_Group        
            by   $Metric_data/ROLE_TYPE as $role_type_id  
            return
            <ns0:RawMetric>
                <ns0:endTime?></ns0:endTime>
                <ns0:target?>{$role_type_id}</ns0:target>
    <ns0:value0>{fn:sum($Metric_data_Group/METRIC_COMPONENT_VALUE0)}</ns0:value0>
    <ns0:value1>{fn:sum($Metric_data_Group/METRIC_COMPONENT_VALUE1)}</ns0:value1>
    <ns0:value2>{fn:sum($Metric_data_Group/METRIC_COMPONENT_VALUE2)}</ns0:value2>
    <ns0:value3>{fn:sum($Metric_data_Group/METRIC_COMPONENT_VALUE3)}</ns0:value3>
    </ns0:RawMetric>
    could you tell me why the result is unstable? thanks!

  • Improve performance when using lots of left join

    when i run this query, it is taking *27 minutes* to execute. all keys have index. please help me to improve performance. i am using 11g.
    select distinct com.m1co as CO_ID,
    fsr.policy_number as POL_ID,
    com.M1AGNM as AGNCY_ID,
    cr.agent_code as AGT_ID,
    P.full_name as agent_name,
    ia.status_description as STS_CD,
    to_char(ia.bound_date, 'MM/DD/YYYY') as POL_INFC_DT,
    (fchgmm||'/'||fchgdd||'/'||fchgyy) as PAY_UP_DT ,
    (mcpdtm||'/'||mcpdtd||'/'||mcpdty) as pay_to_dt,
    (fexpmm||'/'||fexpdd||'/'||fexpyy) as MATURE_DT,
    ia.BILLING_FREQUENCY as PAY_MODE_CD,
    casc.MCPYCD as PAY_METHOD_CD,
    casc.MCPRMM as MODAL_PREM_AMT,
    casc.MCCRCD as POL_CUR,
    casc.MCNOPT as NFO_CD,
    cas.FINSTP as LINE_OF_BUSS,
    (MCPDTM||'/'||MCPDTD||'/'||MCPDTY) as BILL_TO_DT,
    com.M1LOCA as COLL_OFF,
    to_char(ia.bound_date, 'MM/DD/YYYY') as DELIVERY_DT,
    P.FULL_NAME as Serv_AGENT_NAME,
    casm.MWAGTN as SERV_AGT_CD,
    casc.MCNOPT as NFO_RULE,
    ia.STATUS_DESCRIPTION as POL_CSTAT_REASN_CD,
    SUBSTR(datesplit5(datesub),1,10) as APP_RECV_DT,
    to_char(ia.bound_date, 'MM/DD/YYYY') as ISSUE_DT,
    ia.SUM_ASSURED as CVG_FACE_AMT,
    p.IDENTITY_CARD_NUMBER as INSRD_CLI_CD
    FROM financial_services_role fsr
    left join channel_role cr on fsr.role_player_id=cr.role_player_id
    left join person p on (fsr.role_player_id=p.role_player_id and FSR.TYPE_DESCRIPTION IN ('AG','AGT'))
    left join ext_lsp_comagtm1 com on cr.agent_code=com.m1agno
    left join individual_agreement ia on fsr.policy_number =
    DECODE(ia.Business_Key_Contract_Number, NULL, ia.Business_Key_Policy_Number,ia.Business_Key_Contract_Number)
    left join EXT_LSP_CASCNTRM casc on (fsr.policy_number = casc.MCCNTR)
    left join ext_lsp_casbene cas on (fsr.policy_number = cas.fpolno and fbrcd = 0 )
    left join ext_lsp_casmwagt casm on (fsr.policy_number = casm.mwpoln and com.m1agnm = 'TAN')
    left join cdmtgt.EXT_LA_PTRNPF on (chdrnum = fsr.policy_number and
    BATCTRCDE = 'T600')
    WHERE com.m1co = 'IL';
    Thank you
    Edited by: 1000228 on Jun 5, 2013 10:36 AM

    HOW To Make TUNING request
    SQL and PL/SQL FAQ
    SELECT DISTINCT com.m1co                             AS CO_ID,
                    fsr.policy_number                    AS POL_ID,
                    com.m1agnm                           AS AGNCY_ID,
                    cr.agent_code                        AS AGT_ID,
                    ' '                                  AS AGNCY_ID_2,
                    ' '                                  AS AGT_ID_2,
                    ' '                                  AS AGT_ID_2_NAME,
                    P.full_name                          AS agent_name,
                    ia.status_description                AS STS_CD,
                    To_char(ia.bound_date, 'MM/DD/YYYY') AS POL_INFC_DT,
                    ( fchgmm
                      ||'/'
                      ||fchgdd
                      ||'/'
                      ||fchgyy )                         AS PAY_UP_DT,
                    ( mcpdtm
                      ||'/'
                      ||mcpdtd
                      ||'/'
                      ||mcpdty )                         AS pay_to_dt,
                    ( fexpmm
                      ||'/'
                      ||fexpdd
                      ||'/'
                      ||fexpyy )                         AS MATURE_DT,
                    ia.billing_frequency                 AS PAY_MODE_CD,
                    casc.mcpycd                          AS PAY_METHOD_CD,
                    casc.mcprmm                          AS MODAL_PREM_AMT,
                    casc.mccrcd                          AS POL_CUR,
                    casc.mcnopt                          AS NFO_CD,
                    cas.finstp                           AS LINE_OF_BUSS,
                    ' '                                  AS REGLR_OR_SCHEDL_TOPUP,
                    ' '                                  AS POLICY_LAPSED_DT,
                    ( mcpdtm
                      ||'/'
                      ||mcpdtd
                      ||'/'
                      ||mcpdty )                         AS BILL_TO_DT,
                    com.m1loca                           AS COLL_OFF,
                    To_char(ia.bound_date, 'MM/DD/YYYY') AS DELIVERY_DT,
                    P.full_name                          AS Serv_AGENT_NAME,
                    casm.mwagtn                          AS SERV_AGT_CD,
                    casc.mcnopt                          AS NFO_RULE,
                    ia.status_description                AS POL_CSTAT_REASN_CD,
                    Substr(Datesplit5(datesub), 1, 10)   AS APP_RECV_DT,
                    To_char(ia.bound_date, 'MM/DD/YYYY') AS ISSUE_DT,
                    ia.sum_assured                       AS CVG_FACE_AMT,
                    '0'                                  AS BASE_CVG_NUM,
                    p.identity_card_number               AS INSRD_CLI_CD
    FROM   financial_services_role fsr
           left join channel_role cr
                  ON fsr.role_player_id = cr.role_player_id
           left join person p
                  ON ( fsr.role_player_id = p.role_player_id
                       AND FSR.type_description IN ( 'AG', 'AGT' ) )
           left join ext_lsp_comagtm1 com
                  ON cr.agent_code = com.m1agno
           left join individual_agreement ia
                  ON fsr.policy_number = Decode(ia.business_key_contract_number,
                                         NULL,
           ia.business_key_policy_number,
                                         ia.business_key_contract_number)
           left join ext_lsp_cascntrm casc
                  ON ( fsr.policy_number = casc.mccntr )
           left join ext_lsp_casbene cas
                  ON ( fsr.policy_number = cas.fpolno
                       AND fbrcd = 0 )
           left join ext_lsp_casmwagt casm
                  ON ( fsr.policy_number = casm.mwpoln
                       AND com.m1agnm = 'TAN' )
           left join cdmtgt.ext_la_ptrnpf
                  ON ( chdrnum = fsr.policy_number
                       AND batctrcde = 'T600' )
    WHERE  com.m1co = 'IL';

  • How many ways can i improve query performance?

    Hi All,
    can any body help me
    How many ways can i improve query performance in oracle ?
    Thanks,
    narasimha

    As many as you can think of them!!!

  • How can I improve performance when scopes are open?

    How can I improve performance when scopes are open?
    When Color correcting, performance severely lags, stalls, freezes!
    Nothing to complex...simple 3 way color corrector, occasional curves filters.
    I am constantly waiting for the timeline to update as I move around....sometimes as long as a minute or so.
    I'm on brand new 2.7 Ghz 12-Core MacPro with 64 GB of RAM
    Thanks in advance.
    Jay

    http://forums.adobe.com/thread/1369260?tstart=0

Maybe you are looking for

  • Multiple VPN connection question

    I want to connect two on-premise locations to azure.  The hardware in these locations only support static routing so per the documentation I can only connect on site to site tunnel to the vpn connection in azure. Im curious what my options are, can I

  • Crystal Report formula with datediff not working as expected

    We need a Crystal Report formula to display the number of seconds the oldest arriving call has been waiting.  Across multiple resources that can each have an "oldest call".  The database stores a datetime value for the time the oldest call arrived. 

  • Output the number of rows returned in a query

    How do I find out the number of rows that are returned in a query? COUNT function I guess can only be used when there is only one table involved. How do I do it for multi table query like JOIN? For example SELECT emp.first_name, emp.last_name, jobs.a

  • Variable on 0material text ?

    hello BW Experts, Is it possible to create a variable on 0material text ? The user needs to search in the material text .? Suggestions appreciated. Thanks, BWer

  • NetStream.Failed is getting fired frequently

    Hi, I have built a video player using the NetConnection and NetStream class. I have implemented dynamic streaming feature using Adobe's DynamicSwitch, DynamicStream and DynamicStreamItem classes. And the video player was working fine for the past 8 m