How to improve query performance when query with mtart

hi all,
I need to know what is the best way to query out MATNR when i have values for MTART and WERKS?
When a user select a MTART and WERKS, a whole bunch of MATNR related to them are display out. How do i improve this query so that it does not take a long time?
Thanks
Willliam Wilstroth

Is that what you are looking for???
select a~matnr a~mtart ... b~werks ...
       into table <itab>
       from mara as a
       inner join marc as b
       on a~matnr = b~matnr
       where mtart = p_mtart
       and   werks = p_werks.
There is an index on MTART in table MARA.
<b>T           Material Type</b>
Kind Regards
Eswar

Similar Messages

  • How to improve query performance when reporting on ods object?

    Hi,
    Can anybody give me the answer, how to improve my query performance when reporting on ODS object?
    Thanks in advance,
    Ravi Alakuntla.

    Hi Ravi,
    Check these links which may cater your requirement,
    Re: performance issues of ODS
    Which criteria to follow to pick InfoObj. as secondary index of ODS?
    PDF on BW performance tuning,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
    Regards,
    Mani.

  • How to improve the performance of one program in one select query

    Hi,
    I am facing performance issue in one program. I have given some part of the code of the program.
    it is taking much time below select query. How to improve the performance.
    Quick response is highly appreciated.
    Program code
    DATA: BEGIN OF t_dels_tvpod OCCURS 100,
    vbeln LIKE tvpod-vbeln,
    posnr LIKE tvpod-posnr,
    lfimg_diff LIKE tvpod-lfimg_diff,
    calcu LIKE tvpod-calcu,
    podmg LIKE tvpod-podmg,
    uecha LIKE lips-uecha,
    pstyv LIKE lips-pstyv,
    xchar LIKE lips-xchar,
    grund LIKE tvpod-grund,
    END OF t_dels_tvpod,
    DATA: l_tabix LIKE sy-tabix,
    lt_dels_tvpod LIKE t_dels_tvpod OCCURS 10 WITH HEADER LINE,
    ls_dels_tvpod LIKE t_dels_tvpod.
    SELECT vbeln INTO TABLE lt_dels_tvpod FROM likp
    FOR ALL ENTRIES IN t_dels_tvpod
    WHERE vbeln = t_dels_tvpod-vbeln
    AND erdat IN s_erdat
    AND bldat IN s_bldat
    AND podat IN s_podat
    AND ernam IN s_ernam
    AND kunnr IN s_kunnr
    AND vkorg IN s_vkorg
    AND vstel IN s_vstel
    AND lfart NOT IN r_del_types_exclude.
    Waiting for quick response.
    Best regards,
    BDP

    Bansidhar,
    1) You need to add a check to make sure that internal table t_dels_tvpod (used in the FOR ALL ENTRIES clause) is not blank. If it is blank skip the SELECt statement.
    2)  Check the performance with and without clause 'AND lfart NOT IN r_del_types_exclude'. Sometimes NOT causes the select statement to not use the index. Instead of 'lfart NOT IN r_del_types_exclude' use 'lfart IN r_del_types_exclude' and build r_del_types_exclude by using r_del_types_exclude-sign = 'E' instead of 'I'.
    3) Make sure that the table used in the FOR ALL ENTRIES clause has unique delivery numbers.
    Try doing something like this.
    TYPES: BEGIN OF ty_del_types_exclude,
             sign(1)   TYPE c,
             option(2) TYPE c,
             low       TYPE likp-lfart,
             high      TYPE likp-lfart,
           END OF ty_del_types_exclude.
    DATA: w_del_types_exclude TYPE          ty_del_types_exclude,
          t_del_types_exclude TYPE TABLE OF ty_del_types_exclude,
          t_dels_tvpod_tmp    LIKE TABLE OF t_dels_tvpod        .
    IF NOT t_dels_tvpod[] IS INITIAL.
    * Assuming that I would like to exclude delivery types 'LP' and 'LPP'
      CLEAR w_del_types_exclude.
      REFRESH t_del_types_exclude.
      w_del_types_exclude-sign = 'E'.
      w_del_types_exclude-option = 'EQ'.
      w_del_types_exclude-low = 'LP'.
      APPEND w_del_types_exclude TO t_del_types_exclude.
      w_del_types_exclude-low = 'LPP'.
      APPEND w_del_types_exclude TO t_del_types_exclude.
      t_dels_tvpod_tmp[] = t_dels_tvpod[].
      SORT t_dels_tvpod_tmp BY vbeln.
      DELETE ADJACENT DUPLICATES FROM t_dels_tvpod_tmp
        COMPARING
          vbeln.
      SELECT vbeln
        FROM likp
        INTO TABLE lt_dels_tvpod
        FOR ALL ENTRIES IN t_dels_tvpod_tmp
        WHERE vbeln EQ t_dels_tvpod_tmp-vbeln
        AND erdat IN s_erdat
        AND bldat IN s_bldat
        AND podat IN s_podat
        AND ernam IN s_ernam
        AND kunnr IN s_kunnr
        AND vkorg IN s_vkorg
        AND vstel IN s_vstel
        AND lfart IN t_del_types_exclude.
    ENDIF.

  • Please help me how to improve the performance of this query further.

    Hi All,
    Please help me how to improve the performance of this query further.
    Thanks.

    Hi,
    this is not your first SQL tuning request in this community -- you really should learn how to obtain performance diagnostics.
    The information you posted is not nearly enough to even start troubleshooting the query -- you haven't specified elapsed time, I/O, or the actual number of rows the query returns.
    The only piece of information we have is saying that your query executes within a second. If we believe this, then your query doesn't need tuning. If we don't, then we throw it away
    and we're left with nothing.
    Start by reading this blog post: Kyle Hailey &amp;raquo; Power of DISPLAY_CURSOR
    and applying this knowledge to your case.
    Best regards,
      Nikolay

  • How to improve the performance of the query

    Hi,
    Help me by giving tips how to improve the performance of the query. Can I post the query?
    Suresh

    Below is the formatted query and no wonder it is taking lot of time. Will give you a list of issues soon after analyzing more. Till then understand the pitfalls yourself from this formatted query.
    SELECT rt.awb_number,
           ar.activity_id as task_id,
           t.assignee_org_unit_id,
           t.task_type_code,
           ar.request_id
    FROM activity_task ar,
         request_task rt,
         task t
    WHERE ar.activity_id =t.task_id
    AND ar.request_id = rt.request_id
    AND ar.complete_status != 'act.stat.closed'
    AND t.assignee_org_unit_id in (SELECT org_unit_id
                                   FROM org_unit
                                   WHERE org_unit_id in (SELECT oo.org_unit_id
                                                         FROM org_unit oo
                                                         WHERE oo.org_unit_id='3'
                                                         OR oo.parent_id ='3'
                                   OR parent_id in (SELECT oo.org_unit_id
                                                    FROM org_unit oo
                                                    WHERE oo.org_unit_id='3'
                                                    OR oo.parent_id ='3'
                                   AND has_queue=1
    AND ar.parent_task_id not in (SELECT tt.task_id
                                  FROM task tt
                                  WHERE tt.assignee_org_unit_id in (SELECT org_unit_id
                                                                    FROM org_unit
                                                                    WHERE org_unit_id in (SELECT oo.org_unit_id
                                                                                          FROM org_unit oo
                                                                                          WHERE oo.org_unit_id='3'
                                                                                          OR oo.parent_id ='3'
                                                                     OR parent_id in (SELECT oo.org_unit_id
                                                                                      FROM org_unit oo     
                                                                                      WHERE oo.org_unit_id='3'
                                                                                      OR oo.parent_id ='3'
                                                                     AND has_queue=1
    AND rt.awb_number is not null
    ORDER BY rt.awb_numberCheers
    Sarma.

  • HI All, How to improve the performance in given query?

    HI All,
    How to improve the performance in given query?
    Query is..
    PARAMETERS : p_vbeln type lips-vbeln.
    DATA : par_charg TYPE LIPS-CHARG,
    par_werks TYPE LIPS-WERKS,
    PAR_MBLNR TYPE MSEG-MBLNR .
    SELECT SINGLE charg
    werks
    INTO (par_charg, par_werks)
    FROM lips
    WHERE vbeln = p_vbeln.
    IF par_charg IS NOT INITIAL.
    SELECT single max( mblnr )
    INTO par_mblnr
    FROM mseg
    WHERE bwart EQ '101'
    AND werks EQ par_werks (index on werks only)
    AND charg EQ par_charg.
    ENDIF.
    Regards
    Steve

    Hi steve,
    Can't you use the material in your query (and not only the batch)?
    I am assuming your system has an index MSEG~M by MANDT + MATNR + WERKS (+ other fields). Depending on your system (how many different materials you have), this will probably speed up the query considerably.
    Anyway, in our system we ended up by creating an index by CHARG, but leave as a last option, only if selecting by matnr and werks is not good enough for your scenario.
    Hope this helps,
    Rui Dantas

  • Inner Join. How to improve the performance of inner join query

    Inner Join. How to improve the performance of inner join query.
    Query is :
    select f1~ablbelnr
             f1~gernr
             f1~equnr
             f1~zwnummer
             f1~adat
             f1~atim
             f1~v_zwstand
             f1~n_zwstand
             f1~aktiv
             f1~adatsoll
             f1~pruefzahl
             f1~ablstat
             f1~pruefpkt
             f1~popcode
             f1~erdat
             f1~istablart
             f2~anlage
             f2~ablesgr
             f2~abrdats
             f2~ableinh
                from eabl as f1
                inner join eablg as f2
                on f1ablbelnr = f2ablbelnr
                into corresponding fields of table it_list
                where f1~ablstat in s_mrstat
                %_HINTS ORACLE 'USE_NL (T_00 T_01) index(T_01 "EABLG~0")'.
    I wanted to modify the query, since its taking lot of time to load the data.
    Please suggest : -
    Treat this is very urgent.

    Hi Shyamal,
    In your program , you are using "into corresponding fields of ".
    Try not to use this addition in your select query.
    Instead, just use "into table it_list".
    As an example,
    Just give a normal query using "into corresponding fields of" in a program. Now go to se30 ( Runtime analysis), and give the program name and execute it .
    Now if you click on Analyze button , you can see, the analysis given for the query.The one given in "Red" line informs you that you need to find for alternate methods.
    On the other hand, if you are using "into table itab", it will give you an entirely different analysis.
    So try not to give "into corresponding fields" in your query.
    Regards,
    SP.

  • How to Improve the performance in Variable Selection Screen.

    Hi,
    In Query Level we have Variable " User entry Defalt Valu". User want select particular value when he press "F4" it's take hours time how to improve the performance in Varaible Selection Screen.
    Thanks in Advance.
    Regards,
    Venkat.

    Dear Venkat.
    You please try the following steps:
    1. Say the InfoObject is 0EMPLOYEE against which you have created the variable, which user is trying to select value against, when they execute the report.
    2. Goto RSA1-> InfoObject tab-> Select InfoObject 0EMPLOYEE.
    3. Selcet the following options:
       Query Execution Filter Val. Selectn  -  'Only Posted Value for Navigation'
       Filter Value Repr. At Query Exec. -      'Selector Box Without Values'
    Please let me know if there is any more issue. Feel free to raise further concern
    Thnx,
    Sukdev K

  • How to improve the performance in AM level

    Hi,
    I am using Jdeveloper 11.1.1.2.0 and weblogic server 10.3.2.
    How to improve the performance in AM level.
    Actually i have approx 10 lacs Data but when search the record then it is taking more time.
    I have following the link..
    http://www.gebs.ro/blog/oracle/adf-view-object-performance-tuning-analysis/
    but there is no effect in the performance level for seaching.
    So please help me ..
    Thanks
    Anup

    Hi Timo,
    In search page,i m giving empId and click on search button then to execute query it is taking more time.I have override the VOImpl executeQuery(). then it is taking more time
    @Override
    public void executeQuery() {
    setNamedWhereClauseParam("bind_draft", "D");
    setNamedWhereClauseParam("bind_complete","%");
    setNamedWhereClauseParam("bind_reject","%");
    setNamedWhereClauseParam("bind_approve","A");
    setNamedWhereClauseParam("bind_review","R");
    super.executeQuery();
    this method super.executeQuery() is calling and after 5 minutes heap space is comming on cosole as well as page also.
    Thanks
    Anup

  • How to improve the performance of adobe forms

    Hi,
    Please give me some suggestions as to how to improve the performance of adobe form?
    Right now when I' am doing user events it is working fine for first 6 or 7 user events. From the next
    one it is hanging.
    I read about Wizard form design approach, how to use the same here.
    Thanks,
    Aravind

    Hi Otto,
    The form is created using HCM forms and processes. I' am performing user events in the form.
    User events will doa round trip, in which form data will be sent to backend SAP system. Processing will
    happen on the ABAP side and result will appear on the form. First 6 or 7 user events works correctly,
    the result is appearing on the form. Around 8 or 9th one, the wait symbol appears and the form is not
    re-rendered. The form is of size 6 pages. The issue is not coming with form of size 1 page.
    I was reading ways to improve performance during re-rendering given below.
    http://www.adobe.com/devnet/livecycle/articles/DynamicInteractiveFormPerformance.pdf
    It talks about wizard form design approach. But in SFP transaction, I am not seeing any kind of wizard.
    Let me know if you need further details.
    Thanks,
    Aravind

  • How to improve spreadsheet speed when single-threaded VBA is the bottleneck.

    My brother works with massive Excel spreadsheets and needs to speed them up. Gigabytes in size and often with a million rows and many sheets within the workbook. He's already refined the sheets to take advantage of Excel's multi-thread recalculation and
    seen significant improvements, but he's hit a stumbling block. He uses extensive VBA code to aid clarity, but the VB engine is single-threaded, and these relatively simple functions can be called millions of times. Some functions are trivial (e.g. conversion
    functions) and just for clarity and easily unwound (at the expense of clarity), some could be unwound but that would make the spreadsheets much more complex, and others could not be unwound. 
    He's aware of http://www.analystcave.com/excel-vba-multithreading-tool/ and similar tools but they don't help as the granularity is insufficiently fine. 
    So what can he do? A search shows requests for multi-threaded VBA going back over a decade.
    qts

    Hi,
    >> The VB engine is single-threaded, and these relatively simple functions can be called millions of times.
    The Office Object Model is
    Single-Threaded Apartments, if the performance bottleneck is the Excel Object Model operation, the multiple-thread will not improve the performance significantly.
    >> How to improve spreadsheet speed when single-threaded VBA is the bottleneck.
    The performance optimization should be based on the business. Since I’m not familiar with your business, so I can only give you some general suggestions from the technical perspective. According to your description, the size of the spreadsheet had reached
    Gigabytes and data volume is about 1 million rows. If so, I will suggest you storing the data to SQL Server and then use the analysis tools (e.g. Power Pivot).
    Create a memory-efficient Data Model using Excel 2013
    and the Power Pivot add-in
    As
    ryguy72 suggested, you can also leverage some other third party data processing tool
    according to your business requirement.
    Regards,
    Jeffrey
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to improve the performance of serialization/deserialization?

    Hi, Friends,
    I have a question about how to improve the performance of serialization/deserialization.
    When an object is serialized, the entire tree of objects rooted at the object is also serialized. When it is deserialized, the tree is reconstructed. For example, suppose a serializable Father object contains (a serializable field of) an array of Child objects. When a Father object is serialized, so is the array of Child objects.
    For the sake of performance consideration, when I need to deserialize a Father object, I don't want to deserialize any Child object. However, I should be able to know that Father object has children. I should also be able to deserialize any child of that Father object when necessary.
    Could you tell me how to achieve the above idea?
    Thanks.
    Youbin

    You could try something like this...
    import java.io.*;
    import java.util.*;
    class Child implements Serializable {
        int id;
        Child(int _id) { id=_id; }
        public String toString() { return String.valueOf(id); }
    class Father implements Serializable
        Child[] children = new Child[10];
        public Father() {
         Arrays.fill(children, new Child(1001));
        public void readObject(ObjectInputStream stream)
         throws IOException, ClassNotFoundException
         int numchildren = stream.readInt();
         for(int i=0; i<numchildren; i++)
             children[i] = (Child)stream.readObject();
         stream.close();
        public void writeObject(ObjectOutputStream stream) throws IOException
         stream.writeInt(children.length);
         for(int i=0; i<children.length; i++)
             stream.writeObject(children);
         stream.close();
    Child[] getChildren() { return children; }
    class FatherProxy
    int numchildren;
    String filename;
    public FatherProxy(String _filename) throws IOException
         filename = _filename;
         ObjectInputStream ois =
         new ObjectInputStream(new FileInputStream(filename));
         numchildren = ois.readInt();
         ois.close();
    int getNumChildren() { return numchildren; }
    Child[] getChildren() throws IOException, ClassNotFoundException
         ObjectInputStream ois =
         new ObjectInputStream(new FileInputStream(filename));
         Father f = (Father)ois.readObject();
         ois.close();     
         return f.getChildren();
    public class fatherref
    public static void main(String[] args) throws Exception
         // create the serialized file
         Father f = new Father();
         ObjectOutputStream oos =
         new ObjectOutputStream(new FileOutputStream("father.ser"));
         oos.writeObject(f);
         oos.close();
         // read in just what is needed -- numchildren
         FatherProxy fp = new FatherProxy("father.ser");
         System.out.println("numchildren: " + fp.getNumChildren());
         // do some processing
         // you need the rest -- children
         Child[] c = fp.getChildren();
         System.out.println("children:");
         for(int i=0; i<c.length; i++)
         System.out.println("i " + i + ": " + c[i]);

  • How to improve the performance of socket ?

    how to improve the performance of socket ?
    . allocation and deallocation of buffer ?

    No, that exception is thrown when the underlying
    socket (tcp/ip) implementation cannot reserve buffer
    space for new sockets afaik. I get it on windows
    machines when the concurrent connection load reaches
    17-18k connections. I do believe it's configurable
    though.And what happens if your max server load is 7-8 connections an hour and you never close the connections?

  • How to improve the performance of the abap program

    hi all,
    I have created an abap program. And it taking long time since the number of records are more. And can anyone let me know how to improve the performance of my abap program.
    Using se30 and st05 transaction.
    can anyone help me out step by step
    regds
    haritha

    Hi Haritha,
    ->Run Any program using SE30 (performance analysis)
    Note: Click on the Tips & Tricks button from SE30 to get performance improving tips.
    Using this you can improve the performance by analyzing your code part by part.
    ->To turn runtim analysis on within ABAP code insert the following code
    SET RUN TIME ANALYZER ON.
    ->To turn runtim analysis off within ABAP code insert the following code
    SET RUN TIME ANALYZER OFF.
    ->Always check the driver internal tables is not empty, while using FOR ALL ENTRIES
    ->Avoid for all entries in JOINS
    ->Try to avoid joins and use FOR ALL ENTRIES.
    ->Try to restrict the joins to 1 level only ie only for tables
    ->Avoid using Select *.
    ->Avoid having multiple Selects from the same table in the same object.
    ->Try to minimize the number of variables to save memory.
    ->The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)
    ->Avoid creation of index as far as possible
    ->Avoid operators like <>, > , < & like % in where clause conditions
    ->Avoid select/select single statements in loops.
    ->Try to use 'binary search' in READ internal table. -->Ensure table is sorted before using BINARY SEARCH.
    ->Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)
    ->Avoid using ORDER BY in selects
    ->Avoid Nested Selects
    ->Avoid Nested Loops of Internal Tables
    ->Try to use FIELD SYMBOLS.
    ->Try to avoid into Corresponding Fields of
    ->Avoid using Select Distinct, Use DELETE ADJACENT
    Check the following Links
    Re: performance tuning
    Re: Performance tuning of program
    http://www.sapgenie.com/abap/performance.htm
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    check the below link
    http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
    See the following link if it's any help:
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    Check also http://service.sap.com/performance
    and
    books like
    http://www.sap-press.com/product.cfm?account=&product=H951
    http://www.sap-press.com/product.cfm?account=&product=H973
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    Performance tuning for Data Selection Statement
    http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
    Debugger
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    Run Time Analyser
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617cafe68c11d2b2ab080009b43351/content.htm
    SQL trace
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/801f7c454211d189710000e8322d00/content.htm
    CATT - Computer Aided Testing Too
    http://help.sap.com/saphelp_47x200/helpdata/en/b3/410b37233f7c6fe10000009b38f936/frameset.htm
    Test Workbench
    http://help.sap.com/saphelp_47x200/helpdata/en/a8/157235d0fa8742e10000009b38f889/frameset.htm
    Coverage Analyser
    http://help.sap.com/saphelp_47x200/helpdata/en/c7/af9a79061a11d4b3d4080009b43351/content.htm
    Runtime Monitor
    http://help.sap.com/saphelp_47x200/helpdata/en/b5/fa121cc15911d5993d00508b6b8b11/content.htm
    Memory Inspector
    http://help.sap.com/saphelp_47x200/helpdata/en/a2/e5fc84cc87964cb2c29f584152d74e/content.htm
    ECATT - Extended Computer Aided testing tool.
    http://help.sap.com/saphelp_47x200/helpdata/en/20/e81c3b84e65e7be10000000a11402f/frameset.htm
    Just refer to these links...
    performance
    Performance
    Performance Guide
    performance issues...
    Performance Tuning
    Performance issues
    performance tuning
    performance tuning
    You can go to the transaction SE30 to have the runtime analysis of your program.Also try the transaction SCI , which is SAP Code Inspector.
    edited by,
    Naveenan

  • How to improve the performance of the attached query, Please help

    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

    Hello,
    This has really nothing to do with the Oracle Forms product.
    Please, send the SQL or/and PL/SQL questions in the corresponding forums.
    Francois

Maybe you are looking for