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.

Similar Messages

  • 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

  • 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 » Power of DISPLAY_CURSOR
    and applying this knowledge to your case.
    Best regards,
      Nikolay

  • Ways to improve the performance of my query?

    Hi all,
    I have created a multi provider which enables to fetch the data from 3 ods. And each ods contains huge amount of data. As a result my query performance is very slow..
    apart from creating indexes on ods? is there any other to be carried out to improve the performance of my query. Since all the 3 info providers are ods.
    thanxs
    haritha

    Haritha,
    If you still need more info, just have a look below:
    There are few ways your queries can be improved:
    1. Your Data volume in your InfoProviders.
    2. Dim table, how you have manage your objects into your dim table.
    3. Query that runs from multiprovider vs cube itself. when running from multiproviders at the time of execution the system has to create more tables hence the query performance will be affected.
    4. Aggregates into the cube, and they perfection of designing the aggregates.
    5. OLAPCHACHE
    6. Calculation formula
    etc.
    and also you can go thru the links below:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ce7fb368-0601-0010-64ba-fadc985a1f94
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c8c4d794-0501-0010-a693-918a17e663cc
    Hope this helps you.
    ****Assign Points*******
    Gattu

  • Need help in improving the performance for the sql query

    Thanks in advance for helping me.
    I was trying to improve the performance of the below query. I tried the following methods used merge instead of update, used bulk collect / Forall update, used ordered hint, created a temp table and upadated the target table using the same. The methods which I used did not improve any performance. The data count which is updated in the target table is 2 million records and the target table has 15 million records.
    Any suggestions or solutions for improving performance are appreciated
    SQL query:
    update targettable tt
    set mnop = 'G',
    where ( x,y,z ) in
    select a.x, a.y,a.z
    from table1 a
    where (a.x, a.y,a.z) not in (
    select b.x,b.y,b.z
    from table2 b
    where 'O' = b.defg
    and mnop = 'P'
    and hijkl = 'UVW';

    987981 wrote:
    I was trying to improve the performance of the below query. I tried the following methods used merge instead of update, used bulk collect / Forall update, used ordered hint, created a temp table and upadated the target table using the same. The methods which I used did not improve any performance. And that meant what? Surely if you spend all that time and effort to try various approaches, it should mean something? Failures are as important teachers as successes. You need to learn from failures too. :-)
    The data count which is updated in the target table is 2 million records and the target table has 15 million records.Tables have rows btw, not records. Database people tend to get upset when rows are called records, as records exist in files and a database is not a mere collection of records and files.
    The failure to find a single faster method with the approaches you tried, points to that you do not know what the actual performance problem is. And without knowing the problem, you still went ahead, guns blazing.
    The very first step in dealing with any software engineering problem, is to identify the problem. Seeing the symptoms (slow performance) is still a long way from problem identification.
    Part of identifying the performance problem, is understanding the workload. Just what does the code task the database to do?
    From your comments, it needs to find 2 million rows from 15 million rows. Change these rows. And then write 2 million rows back to disk.
    That is not a small workload. Simple example. Let's say that the 2 million row find is 1ms/row and the 2 million row write is also 1ms/row. This means a 66 minute workload. Due to the number of rows, an increase in time/row either way, will potentially have 2 million fold impact.
    So where is the performance problem? Time spend finding the 2 million rows (where other tables need to be read, indexes used, etc)? Time spend writing the 2 million rows (where triggers and indexes need to be fired and maintained)? Both?

  • Imporving the performance of a query

    Hi,
    I have the following query in Oracle:
    SELECT distinct VECTOR_ID FROM SUMMARY_VECTOR where CASE_NAME like 'BASECASE_112_ECLIPSE100'
    "SUMMARY_VECTOR" contains approximately 120 million records or tuples. So the total time for this query is about 62 seconds
    I want to improve the performance of this query. How can I achieve this ?
    any hint ?
    Thanks

    PLAN_TABLE_OUTPUT
    Plan hash value: 3042243244
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time
    |
    PLAN_TABLE_OUTPUT
    | 0 | SELECT STATEMENT | | 1 | 29 | 182K (3)| 00:36
    :28 |
    | 1 | SORT AGGREGATE | | 1 | 29 | |
    |
    |* 2 | TABLE ACCESS FULL| SUMMARY_VECTOR | 4323K| 119M| 182K (3)| 00:36
    :28 |
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
    2 - filter("CASE_NAME"='BASECASE_112_ECLIPSE100')
    14 rows selected.

  • Please help me to increase the performance of the query

    Hello
    I am not an oracle expert or developer and i have a problem to resolve.
    Below is the query and explaiation plan and seeking the help to improve the performance of the query.
    Our Analysis,
    The query runs good,takes less one minute and fetches the results but during peak time it takes 8 minutes
    Require anyone suggestion's to improve the query.
    The query is generated from the Microsft dll so we dont have SQL code and require some help on tuning the tables.
    If tuning the query improves then also fine please suggest for that also.
    Enviroment: Solaris 8
    DB : oracle 9i
    (SELECT vw.dispapptobjid, vw.custsiteobjid, vw.emplastname, vw.empfirstname,
    vw.scheduledonsite AS starttime, vw.appttype, vw.latestart,
    vw.endtime, vw.typetitle, vw.empobjid, vw.latitude, vw.longitude,
    vw.workduration AS DURATION, vw.dispatchtype, vw.availability
    FROM ora_appt_disp_view vw
    WHERE ( ( vw.starttime >=
    TO_DATE ('2/12/2007 4:59 PM', 'MM/DD/YYYY HH12:MI AM')
    AND vw.starttime <
    TO_DATE ('2/21/2007 3:59 PM', 'MM/DD/YYYY HH12:MI AM')
    OR vw.endtime >
    TO_DATE ('2/12/2007 4:59 PM', 'MM/DD/YYYY HH12:MI AM')
    AND vw.endtime <=
    TO_DATE ('2/21/2007 3:59 PM', 'MM/DD/YYYY HH12:MI AM')
    OR ( vw.starttime <=
    TO_DATE ('2/12/2007 4:59 PM', 'MM/DD/YYYY HH12:MI AM')
    AND vw.endtime >=
    TO_DATE ('2/21/2007 3:59 PM', 'MM/DD/YYYY HH12:MI AM')
    UNION
    (SELECT 0 AS dispapptobjid, emp.emp_physical_site2site AS custsiteobjid,
    emp.last_name AS emplastname, emp.first_name AS empfirstname,
    TO_DATE ('1/1/3000', 'MM/DD/YYYY') AS starttime, 'E' AS appttype,
    NULL AS latestart, NULL AS endtime, '' AS typetitle,
    emp.objid AS empobjid, 0 AS latitude, 0 AS longitude, 0 AS DURATION,
    '' AS dispatchtype, 0 AS availability
    FROM table_employee emp, table_user usr
    WHERE emp.employee2user = usr.objid AND emp.field_eng = 1 AND usr.status = 1)
    ORDER BY empobjid, starttime, endtime DESC
    Operation     Object Name     Rows     Bytes     Cost     Object Node     In/Out     PStart     PStop
    SELECT STATEMENT Optimizer Mode=HINT: ALL_ROWS          23 K          11312                     
    SORT UNIQUE          23 K     3 M     11140                     
    UNION-ALL                                        
    VIEW     ORA_APPT_DISP_VIEW     17 K     3 M     10485                     
    UNION-ALL                                        
    CONCATENATION                                        
    NESTED LOOPS OUTER          68      24 K     437                     
    NESTED LOOPS          68      23 K     369                     
    NESTED LOOPS OUTER          68      25 K     505                     
    NESTED LOOPS OUTER          68      24 K     505                     
    NESTED LOOPS          68      23 K     369                     
    NESTED LOOPS          68      22 K     369                     
    NESTED LOOPS OUTER          68      22 K     369                     
    NESTED LOOPS          19      6 K     312                     
    NESTED LOOPS          19      5 K     312                     
    HASH JOIN          19      5 K     293                     
    NESTED LOOPS          19      5 K     274                     
    NESTED LOOPS          19      4 K     236                     
    NESTED LOOPS          19      4 K     198                     
    NESTED LOOPS OUTER          19      3 K     160                     
    NESTED LOOPS OUTER          19      3 K     160                     
    NESTED LOOPS OUTER          19      4 K     160                     
    NESTED LOOPS OUTER          19      1 K     103                     
    NESTED LOOPS OUTER          19      2 K     103                     
    NESTED LOOPS OUTER          19      2 K     103                     
    TABLE ACCESS BY INDEX ROWID     TABLE_DISPTCHFE     19      1 K     46                     
    INDEX RANGE SCAN     GSA_SCHED_REPAIR     44           3                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      22                          
    INDEX RANGE SCAN     GSA_COMDFE     1           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      22                          
    INDEX RANGE SCAN     GSA_COMDFE     1           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      22      3                     
    INDEX RANGE SCAN     GSA_COMDFE     1           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      28                          
    INDEX RANGE SCAN     IND_CASE_COMMIT2CASE     2           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      28                          
    INDEX RANGE SCAN     IND_CASE_COMMIT2CASE     2           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      28      3                     
    INDEX RANGE SCAN     IND_CASE_COMMIT2CASE     2           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_CASE     1      30      2                     
    INDEX UNIQUE SCAN     CASE_OBJINDEX     1           1                     
    TABLE ACCESS BY INDEX ROWID     TABLE_SITE     1      12      2                     
    INDEX UNIQUE SCAN     SITE_OBJINDEX     1           1                     
    TABLE ACCESS BY INDEX ROWID     TABLE_ADDRESS     1      12      2                     
    INDEX UNIQUE SCAN     ADDRESS_OBJINDEX     1           1                     
    TABLE ACCESS FULL     TABLE_EMPLOYEE     1      34      1                     
    INDEX UNIQUE SCAN     SITE_OBJINDEX     1      6      1                     
    INDEX UNIQUE SCAN     USER_OBJINDEX     1      6                          
    TABLE ACCESS BY INDEX ROWID     TABLE_X_GSA_TIME_STAMPS     4      48      3                     
    INDEX RANGE SCAN     GSAIDX_TS2DISP     1           2                     
    INDEX UNIQUE SCAN     GBST_ELM_OBJINDEX     1      6                          
    INDEX UNIQUE SCAN     GBST_ELM_OBJINDEX     1      6                          
    TABLE ACCESS BY INDEX ROWID     TABLE_MOD_LEVEL     1      12      1                     
    INDEX UNIQUE SCAN     MOD_LEVEL_OBJINDEX     1                               
    INDEX UNIQUE SCAN     PART_NUM_OBJINDEX     1      6                          
    INDEX UNIQUE SCAN     GBST_ELM_OBJINDEX     1      6                          
    INDEX UNIQUE SCAN     SUBCASE_OBJINDX     1      6      1                     
    NESTED LOOPS OUTER          68      25 K     505                     
    NESTED LOOPS OUTER          68      24 K     505                     
    NESTED LOOPS OUTER          68      24 K     437                     
    NESTED LOOPS          68      23 K     369                     
    NESTED LOOPS          68      23 K     369                     
    NESTED LOOPS          68      22 K     369                     
    NESTED LOOPS OUTER          68      22 K     369                     
    NESTED LOOPS          19      6 K     312                     
    NESTED LOOPS          19      5 K     312                     
    NESTED LOOPS          19      5 K     293                     
    NESTED LOOPS          19      5 K     274                     
    NESTED LOOPS          19      4 K     236                     
    NESTED LOOPS          19      4 K     198                     
    NESTED LOOPS OUTER          19      4 K     160                     
    NESTED LOOPS OUTER          19      3 K     160                     
    NESTED LOOPS OUTER          19      3 K     160                     
    NESTED LOOPS OUTER          19      2 K     103                     
    NESTED LOOPS OUTER          19      2 K     103                     
    NESTED LOOPS OUTER          19      1 K     103                     
    TABLE ACCESS BY INDEX ROWID     TABLE_DISPTCHFE     19      1 K     46                     
    INDEX RANGE SCAN     GSA_SCHED_REPAIR     44           3                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      22      3                     
    INDEX RANGE SCAN     GSA_COMDFE     1           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      22                          
    INDEX RANGE SCAN     GSA_COMDFE     1           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      22                          
    INDEX RANGE SCAN     GSA_COMDFE     1           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      28      3                     
    INDEX RANGE SCAN     IND_CASE_COMMIT2CASE     2           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      28                          
    INDEX RANGE SCAN     IND_CASE_COMMIT2CASE     2           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      28                          
    INDEX RANGE SCAN     IND_CASE_COMMIT2CASE     2           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_CASE     1      30      2                     
    INDEX UNIQUE SCAN     CASE_OBJINDEX     1           1                     
    TABLE ACCESS BY INDEX ROWID     TABLE_SITE     1      12      2                     
    INDEX UNIQUE SCAN     SITE_OBJINDEX     1           1                     
    TABLE ACCESS BY INDEX ROWID     TABLE_ADDRESS     1      12      2                     
    INDEX UNIQUE SCAN     ADDRESS_OBJINDEX     1           1                     
    TABLE ACCESS BY INDEX ROWID     TABLE_EMPLOYEE     1      34      1                     
    INDEX UNIQUE SCAN     EMPLOYEE_OBJINDEX     1                               
    INDEX UNIQUE SCAN     SITE_OBJINDEX     1      6      1                     
    INDEX UNIQUE SCAN     USER_OBJINDEX     1      6                          
    TABLE ACCESS BY INDEX ROWID     TABLE_X_GSA_TIME_STAMPS     4      48      3                     
    INDEX RANGE SCAN     GSAIDX_TS2DISP     1           2                     
    INDEX UNIQUE SCAN     GBST_ELM_OBJINDEX     1      6                          
    INDEX UNIQUE SCAN     GBST_ELM_OBJINDEX     1      6                          
    INDEX UNIQUE SCAN     GBST_ELM_OBJINDEX     1      6                          
    INDEX UNIQUE SCAN     SUBCASE_OBJINDX     1      6      1                     
    TABLE ACCESS BY INDEX ROWID     TABLE_MOD_LEVEL     1      12      1                     
    INDEX UNIQUE SCAN     MOD_LEVEL_OBJINDEX     1                               
    INDEX UNIQUE SCAN     PART_NUM_OBJINDEX     1      6                          
    NESTED LOOPS OUTER          68      25 K     505                     
    NESTED LOOPS OUTER          68      24 K     505                     
    NESTED LOOPS OUTER          68      24 K     437                     
    NESTED LOOPS          68      23 K     369                     
    NESTED LOOPS          68      23 K     369                     
    NESTED LOOPS          68      22 K     369                     
    NESTED LOOPS OUTER          68      22 K     369                     
    NESTED LOOPS          19      6 K     312                     
    NESTED LOOPS          19      5 K     312                     
    NESTED LOOPS          19      5 K     293                     
    NESTED LOOPS          19      5 K     274                     
    NESTED LOOPS          19      4 K     236                     
    NESTED LOOPS          19      4 K     198                     
    NESTED LOOPS OUTER          19      4 K     160                     
    NESTED LOOPS OUTER          19      3 K     160                     
    NESTED LOOPS OUTER          19      3 K     160                     
    NESTED LOOPS OUTER          19      2 K     103                     
    NESTED LOOPS OUTER          19      2 K     103                     
    NESTED LOOPS OUTER          19      1 K     103                     
    TABLE ACCESS BY INDEX ROWID     TABLE_DISPTCHFE     19      1 K     46                     
    INDEX RANGE SCAN     GSA_REQ_ETA     44           3                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      22      3                     
    INDEX RANGE SCAN     GSA_COMDFE     1           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      22                          
    INDEX RANGE SCAN     GSA_COMDFE     1           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      22                          
    INDEX RANGE SCAN     GSA_COMDFE     1           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      28      3                     
    INDEX RANGE SCAN     IND_CASE_COMMIT2CASE     2           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      28                          
    INDEX RANGE SCAN     IND_CASE_COMMIT2CASE     2           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_COMMIT_LOG     1      28                          
    INDEX RANGE SCAN     IND_CASE_COMMIT2CASE     2           2                     
    TABLE ACCESS BY INDEX ROWID     TABLE_CASE     1      30      2                     
    INDEX UNIQUE SCAN     CASE_OBJINDEX     1           1                     
    TABLE ACCESS BY INDEX ROWID     TABLE_SITE     1      12      2                     
    INDEX UNIQUE SCAN     SITE_OBJINDEX     1           1                     
    TABLE ACCESS BY INDEX ROWID     TABLE_ADDRESS     1      12      2                     
    INDEX UNIQUE SCAN     ADDRESS_OBJINDEX     1           1                     
    TABLE ACCESS BY INDEX ROWID     TABLE_EMPLOYEE     1      34      1                     
    INDEX UNIQUE SCAN     EMPLOYEE_OBJINDEX     1                               
    INDEX UNIQUE SCAN     SITE_OBJINDEX     1      6      1                     
    INDEX UNIQUE SCAN     USER_OBJINDEX     1      6                          
    TABLE ACCESS BY INDEX ROWID     TABLE_X_GSA_TIME_STAMPS     4      48      3                     
    INDEX RANGE SCAN     GSAIDX_TS2DISP     1           2                     
    INDEX UNIQUE SCAN     GBST_ELM_OBJINDEX     1      6                          
    INDEX UNIQUE SCAN     GBST_ELM_OBJINDEX     1      6                          
    INDEX UNIQUE SCAN     GBST_ELM_OBJINDEX     1      6                          
    INDEX UNIQUE SCAN     SUBCASE_OBJINDX     1      6      1                     
    TABLE ACCESS BY INDEX ROWID     TABLE_MOD_LEVEL     1      12      1                     
    INDEX UNIQUE SCAN     MOD_LEVEL_OBJINDEX     1                               
    INDEX UNIQUE SCAN     PART_NUM_OBJINDEX     1      6                          
    NESTED LOOPS          16 K     2 M     5812                     
    HASH JOIN          16 K     2 M     5812                     
    HASH JOIN          16 K     2 M     5286                     
    TABLE ACCESS FULL     TABLE_EMPLOYEE     13 K     441 K     28                     
    HASH JOIN          16 K     1 M     5243                     
    TABLE ACCESS FULL     TABLE_SCHEDULE     991      11 K     2                     
    HASH JOIN OUTER          16 K     1 M     5240                     
    HASH JOIN OUTER          16 K     1 M     3866                     
    HASH JOIN OUTER          16 K     1 M     450                     
    HASH JOIN          16 K     1 M     44                     
    TABLE ACCESS FULL     TABLE_GBST_ELM     781      14 K     2                     
    TABLE ACCESS FULL     TABLE_APPOINTMENT     16 K     822 K     41                     
    INDEX FAST FULL SCAN     CASE_OBJINDEX     1 M     6 M     201                     
    TABLE ACCESS FULL     TABLE_SITE     967 K     11 M     3157                     
    TABLE ACCESS FULL     TABLE_ADDRESS     961 K     11 M     1081                     
    INDEX FAST FULL SCAN     SITE_OBJINDEX     967 K     5 M     221                     
    INDEX UNIQUE SCAN     USER_OBJINDEX     1      6                          
    HASH JOIN          6 K     272 K     51                     
    TABLE ACCESS FULL     TABLE_USER     6 K     51 K     21                     
    TABLE ACCESS FULL     TABLE_EMPLOYEE     6 K     220 K     28

    Hi,
    First-off, it appear that you are querying a view. I would redo the auery against the base table.
    Next, look at a function-based index for the DATE column. Here are my notes:
    http://www.dba-oracle.com/t_function_based_indexes.htm
    http://www.dba-oracle.com/oracle_tips_index_scan_fbi_sql.htm
    Also, make sure you are analyzed properly with dbms_stats:
    http://www.dba-oracle.com/art_builder_dbms_stats.htm
    And histograms, if appropriate:
    http://www.dba-oracle.com/art_builder_histo.htm
    Lasty, look at increasing hash_area_size or pga_aggregate_tagtet, depending on your table sizes:
    http://www.dba-oracle.com/art_so_undocumented_pga_parameters.htm
    Hope this helps. . . .
    Donald K. Burleson
    Oracle Press Author

  • Improve the performance of the data activation on DSO.

    Hi,
    I would like to improve the performance of the data activation on DSO. 1000 records should be uploaded by 10 minutes.
    Now it takes 10 minutes to activate data in DSO. And it is strange that it takes long time ( about 9 minutes) before starting activation.
    ex :
    in the request task log of the activation:
    data activation    15:10:00
    main process     15:10:01
    technical status  15:10:21
    But activation is started at 15:01:00 here. (this is started via process chain).
    I have no idea why it takes so long time and how I can improve.
    Kind regards,
    Masaaki

    Hi,
    Try this also.
    1. Remove Bex Reporting check box in ODS if not required.
    2. Goto manage ODS -> activate -> activate in parallel -> increase the number of processes from there.For direct access try TCode RSODSO_SETTINGS. Not sure this is possible in your case.
    thanks,
    JituK

  • Options to improve the performance of the Job

    Hi Team,
    As part of the CRM Upgrade requirement, we are planning to use Account Life cycle functionality to reflect the status of an account.
    As per the SAP recommendations( Note 1113330) we are currently executing the program CRM_BUPA_USERSTATUS_CONV2ROLE to convert user status master data to BP roles. We have noticed that this program is taking more time even when we run this for single business partner. We are trying to explore the options on how to improve the performance of the job. Incase if anyone have done this kind of exercise in any of their previous assignments or have information on this, request to provide your feedback on the below points.
    1) Total Volume of Customer Master Data
    2) How many records did we consider for one execution of the conversion program
    3) How much time did it toke for one execution ?Did we do any performance tuning
    4) When we are running the program in back ground mode..we are not getting the spool
    showing the log information. Was there any custom report developed to view the log when
    we execute the program in background mode..if so can you share us the technical details
    6) Any information on how many work processors that were available for executing the jobs 
    Appreciate your help.
    Regards,
    Varun

    Hello Udaya ,
    Could you please tryy providing a range of BPs as per note 1121015? This can help in improving the performance .
    Thanks & regards,
    Krishnen

  • Gather Schema Statistics improve the performance of the R12 application?

    Hi All,
    If we run “Gather Schema Statistics” program, it will improve the performance of the R12 application?
    Platform Linux and DB version 10.2.0.4.
    Thanks & Regards,
    Tharun

    Hi Tharun,
    If we ruer n “Gather Schema Statistics” program, it will improve the performance of the R12 application?
    Yes, it will speed up as it ensures to have an up to date statistics.
    Please refer notes:
    Concurrent Processing - How To Gather Statistics On Oracle Applications Release 11i and/or Release 12 - Concurrent Process,Temp Tables, Manually [ID 419728.1]
    How Often Should Gather Schema Statistics Program be Run? [ID 168136.1]
    Why Stats Gather?
    Stats gathering must be set as a routine job and is recommended to be scheduled. Even though this program is available from the fronted in the form of submitting a concurrent program basically it performs a DB level enhancement and ensures that you have an up to date optimizer statistics.Because the objects in a database can be constantly changing, statistics must be regularly updated so that they accurately describe these database objects.
    For indepth understand as to why it should be run, please refer doc:
    Managing Optimizer Statistics
    Thanks &
    Best Regards,

  • Hpw to tune the performance of following query?

    Hi all,
               I want a particular set of G/L acct nos for the list of billing documents that i have in an internal table ie. pt_vbrk. I am using table BSIS.However ,when i use the following query it is taking  very very long time .I even tried using LOOP...ENDLOOP statement.Can anyone tell me how to enhance the performance of the query?Thanks in advance.
    i = 0.
    loop at pt_vbrk.
    i = i + 1.
    endloop.
    while j <= i.
    read table pt_vbrk index j.
    select single hkont  from bsis into  corresponding fields of
    pt_vbrk where
    ( hkont = '0013100000' or hkont = '0013105000'
    or hkont = '0013110000' or hkont = '0013112000'
    or hkont = '0013115000' or hkont = '0013120000'
    or hkont = '0013125000' or hkont = '0013135500'
    or hkont = '0013140000' or hkont = '0013145000'
    or hkont = '0013155000' or hkont = '0013165000'
    or hkont = '0013175000' or hkont = '0013170000' )
    and belnr = pt_vbrk-belnr and  gjahr = pt_vbrk-gjahr   . "#EC CI_NOFIRST
    modify pt_vbrk from pt_vbrk index j.
    j = j + 1.
    endwhile.
    Moderator message - Moved to the correct forum
    Edited by: Rob Burbank on Sep 22, 2009 9:06 AM

    Try the following approach.
    TYPES: BEGIN OF ty_bsis,
             bukrs TYPE bsis-bukrs,
             hkont TYPE bsis-hkont,
             augdt TYPE bsis-augdt,
             augbl TYPE bsis-augbl,
             zuonr TYPE bsis-zuonr,
             gjahr TYPE bsis-gjahr,
             belnr TYPE bsis-belnr,
             buzei TYPE bsis-buzei,
           END OF ty_bsis.
    DATA: w_bsis     TYPE                 ty_bsis ,
          w_index    TYPE                 sy-tabix,
          t_bsis     TYPE SORTED TABLE OF ty_bsis
            WITH NON-UNIQUE KEY bukrs belnr gjahr ,
          t_vbrk_tmp LIKE        TABLE OF pt_vbrk .
    RANGES: r_hkont FOR bsis-hkont.
    IF NOT pt_vbrk[] IS INITIAL.
      REFRESH r_hkont.
      r_hkont-sign   = 'I'.
      r_hkont-option = 'EQ'.
      r_hkont-low = '0013100000'.
      APPEND r_hkont.
      r_hkont-low = '0013105000'.
      APPEND r_hkont.
      r_hkont-low = '0013110000'.
      APPEND r_hkont.
      r_hkont-low = '0013112000'.
      APPEND r_hkont.
      r_hkont-low = '0013115000'.
      APPEND r_hkont.
      r_hkont-low = '0013120000'.
      APPEND r_hkont.
      r_hkont-low = '0013125000'.
      APPEND r_hkont.
      r_hkont-low = '0013135500'.
      APPEND r_hkont.
      r_hkont-low = '0013140000'.
      APPEND r_hkont.
      r_hkont-low = '0013145000'.
      APPEND r_hkont.
      r_hkont-low = '0013155000'.
      APPEND r_hkont.
      r_hkont-low = '0013165000'.
      APPEND r_hkont.
      r_hkont-low = '0013175000'.
      APPEND r_hkont.
      r_hkont-low = '0013170000'.
      APPEND r_hkont.
      t_vbrk_tmp[] = pt_vbrk[].
      SORT t_vbrk_tmp BY bukrs gjahr belnr.
      DELETE ADJACENT DUPLICATES FROM t_vbrk_tmp
        COMPARING bukrs gjahr belnr.
      SELECT bukrs
             hkont
             augdt
             augbl
             zuonr
             gjahr
             belnr
             buzei
        FROM bsis
        INTO TABLE t_bsis
        FOR ALL ENTRIES IN t_vbrk_tmp
        WHERE bukrs EQ t_vbrk_tmp-bukrs
        AND   hkont IN r_hkont
        AND   gjahr EQ t_vbrk_tmp-gjahr
        AND   belnr EQ t_vbrk_tmp-belnr.
      IF sy-subrc EQ 0.
        LOOP AT pt_vbrk.
          w_index = sy-tabix.
          READ TABLE t_bsis INTO w_bsis
            WITH KEY bukrs = pt_vbrk-bukrs
                     belnr = pt_vbrk-belnr
                     gjahr = pt_vbrk-gjahr
                     TRANSPORTING
                       hkont.
          IF sy-subrc EQ 0.
            pt_vbrk-hkont = w_bsis-hkont.
            MODIFY pt_vbrk INDEX w_index
              TRANSPORTING
                hkont.
          ENDIF.
        ENDIF.
      ENDIF.

  • Need help in optimising the performance of a query

    Need help in optimising the performance of a query. Below is the query that is executed on TABLE_A, TABLE_B and TABLE_C with record counts as 10M, 10m and 42 (only) respectively and it takes around 5-7 minutes to get 40 records:
    SELECT DISTINCT a.T_ID_, a.FIRSTNAME, b.T_CODE, b.PRODUCT,
    CASE WHEN TRUNC(b.DATE) +90 = TRUNC(SYSDATE) THEN -90 WHEN TRUNC(b.DATE) +30 = TRUNC(SYSDATE) THEN -30 ELSE 0 END AS T_DATE FROM TABLE_B b
    INNER JOIN TABLE_A a ON (a.T_ID_ = b.T_ID_) LEFT JOIN TABLE_C c ON b.PRODUCT = c.PRODUCT
    WHERE b.STATUS = 'T' AND (b.TYPE = 'ACTION'
    AND ( TRUNC(b.DATE) + 1 = TRUNC(SYSDATE) ) ) AND b.PRODUCT = 2;
    Note: Indices on the join columns are available in the respective tables
    Please let me know if there is any better way to write it.
    Edited by: 862944 on Aug 18, 2011 9:52 AM

    862944 wrote:
    Need help in optimising the performance of a query. Below is the query that is executed on TABLE_A, TABLE_B and TABLE_C with record counts as 10M, 10m and 42 (only) respectively and it takes around 5-7 minutes to get 40 records:
    SELECT DISTINCT a.T_ID_, a.FIRSTNAME, b.T_CODE, b.PRODUCT,
    CASE WHEN TRUNC(b.DATE) +90 = TRUNC(SYSDATE) THEN -90 WHEN TRUNC(b.DATE) +30 = TRUNC(SYSDATE) THEN -30 ELSE 0 END AS T_DATE FROM TABLE_B b
    INNER JOIN TABLE_A a ON (a.T_ID_ = b.T_ID_) LEFT JOIN TABLE_C c ON b.PRODUCT = c.PRODUCT
    WHERE b.STATUS = 'T' AND (b.TYPE = 'ACTION'
    AND ( TRUNC(b.DATE) + 1 = TRUNC(SYSDATE) ) ) AND b.PRODUCT = 2;
    Note: Indices on the join columns are available in the respective tables
    Please let me know if there is any better way to write it.
    Edited by: 862944 on Aug 18, 2011 9:52 AM[When Your Query Takes Too Long|https://forums.oracle.com/forums/thread.jspa?messageID=1812597]

  • How to check the performance of the database instance in oracle apps 11i

    hii everybody,
    i want to know,how to check the performance of the database instance using oracle applications 11i.your help highly appreciated,thanks.

    Pl do not post duplicates - how to check the performance of the server in oracle applications 11i

  • Improve the performance of the code

    Hi All,
    Just check the below report and give some hits to improve the performance of the report.
      LOOP AT WBS_TAB.
        CLEAR: HOLD_PO_NBR,                                    
               HOLD_PO_LINE.                                   
        SELECT * FROM EKKN
                 WHERE PS_PSP_PNR = WBS_TAB-INTNO
                 AND EBELN IN S_PO
                 AND KOKRS = P_KOKRS.
          CHECK EKKN-LOEKZ <> 'X'.
          CLEAR GC_PROFL.
          WRITE WBS_TAB-PSPHI TO LC_PSPID.
    *select direct projects only if p_direct = 'X'.
          IF P_DIRECT = 'X'.                        
            SELECT SINGLE PROFL FROM PROJ INTO GC_PROFL        
                   WHERE PSPID = LC_PSPID.          
            IF GC_PROFL+4(3) = '002'                
            OR GC_PROFL+4(3) = '007'.               
              CONTINUE.                            
            ENDIF.                                  
          ENDIF.
    select indirect projects and cost centers only when p_indir = 'X'.
          IF P_INDIR = 'X'.                         
            SELECT SINGLE PROFL FROM PROJ INTO GC_PROFL        
                   WHERE PSPID = LC_PSPID.          
            IF GC_PROFL+4(3) NE '002'               
            AND GC_PROFL+4(3) NE '007'.             
              CONTINUE.                             
            ENDIF.                                  
          ENDIF.                                   
          CLEAR: GC_EINDT,                          
                 GC_PRCTR.                          
          GC_PRCTR = WBS_TAB-PRCTR.                 
          PERFORM PROCESS_MAIN2.
        ENDSELECT.
      ENDLOOP.
    FORM PROCESS_MAIN2.
      SELECT SINGLE * FROM EKKO WHERE EBELN = EKKN-EBELN.
      CHECK EKKO-LIFNR IN VEND_NO.
      CHECK EKKO-AEDAT IN S_POCDAT.                            
      SELECT SINGLE * FROM EKPO WHERE EBELN = EKKN-EBELN AND
                                      EBELP = EKKN-EBELP.
      CHECK EKPO-LOEKZ <> 'L' AND
            EKPO-LOEKZ <> 'S'.                                 
      SELECT SINGLE EINDT FROM EKET INTO GC_EINDT   
        WHERE EBELN = EKPO-EBELN                    
        AND EBELP   = EKPO-EBELP                    
        AND EINDT IN S_EINDT.                       
      IF NOT S_EINDT IS INITIAL.                   
        CHECK GC_EINDT IN S_EINDT.                  
      ENDIF.                                        
      CLEAR ITAB.
      ITAB-PO_CREATE = EKKO-AEDAT.                             
      ITAB-DEL_DAT   = GC_EINDT.                   
      ITAB-PO_NO     = EKKO-EBELN.
      ITAB-CURR_PO   = EKKO-WAERS.
      ITAB-CURR_CO   = TKA01-WAERS.
      ITAB-LINE      = EKPO-EBELP.
      ITAB-GR_SW     = EKPO-WEPOS.
      ITAB-GR_NON_VAL_SW = EKPO-WEUNB.
      IF EKPO-WEUNB = 'X'.                 "Goods Receipt, Non-Value
        ITAB-GR_SW = ''.        "switch evaluation of commitment to IR
      ENDIF.
      ITAB-TEXT       = EKPO-TXZ01.
      ITAB-QTY_ORD    = EKPO-MENGE.
      ITAB-UOM        = EKPO-MEINS.
      ITAB-AMOUNT_DOC = EKPO-EFFWR.
      ITAB-WBS = EKKN-PS_PSP_PNR.
      ITAB-COST_ELEM = EKKN-SAKTO.                             
      ITAB-KOSTL = EKKN-KOSTL.                                 
      ITAB-PRCTR = GC_PRCTR.
      ITAB-ANLN1 = EKKN-ANLN1.                                 
      ITAB-AUFNR = EKKN-AUFNR.                                
      ITAB-ZEKKN = EKKN-ZEKKN.                                 
      IF EKKN-VPROZ <> 0.
        PERCENT = EKKN-MENGE / EKPO-MENGE.
        ITAB-AMOUNT_DOC = ITAB-AMOUNT_DOC * PERCENT .
        ITAB-QTY_ORD = ITAB-QTY_ORD * PERCENT .
      ENDIF.
      IF ITAB-CURR_CO NE ITAB-CURR_PO.
      itab-amount_co = itab-amount_doc * ekko-wkurs.
           Convert from PO curr to CO currency
        GS_CONV_AMT = ITAB-AMOUNT_DOC / GS_CORATE.
        PERFORM GET_CURR_RATE USING ITAB-CURR_PO EKKO-AEDAT
                              CHANGING GS_RATE.
        ITAB-AMOUNT_CO =  GS_CONV_AMT * GS_RATE.
      ELSE.
        ITAB-AMOUNT_CO = ITAB-AMOUNT_DOC.
      ENDIF.
           Convert from PO curr to CO Code currency
      CLEAR: ITAB-CURR_LOC, GS_RATE.
      PERFORM GET_COCD_RATE USING EKKO-BUKRS
                            CHANGING ITAB-CURR_LOC GS_RATE.
      IF ITAB-CURR_LOC NE ITAB-CURR_PO.
                    Get company code/local currency and rate.
        GS_CONV_AMT = ITAB-AMOUNT_DOC / GS_RATE.
        PERFORM GET_CURR_RATE USING ITAB-CURR_PO ITAB-PO_CREATE
                              CHANGING GS_RATE.
        ITAB-AMOUNT_LOC =  GS_CONV_AMT * GS_RATE.
      ELSE.
        ITAB-AMOUNT_LOC = ITAB-AMOUNT_DOC.
      ENDIF.
      ITAB-VEND_NO   = EKKO-LIFNR.
      APPEND ITAB.
      CLEAR ITAB.
    ENDFORM.
    Thanks,
    Subbu.

    Hi,
    In your code instead of using
    SELECT * FROM EKKN
    WHERE PS_PSP_PNR = WBS_TAB-INTNO
    AND EBELN IN S_PO
    AND KOKRS = P_KOKRS.
    ENSELECT
    USe
    DATA:
    TYPES: BEGIN OF t_ekkn.
            INCLUDE STRUCTURE ekkn.
    TYPES: END OF t_ekkn.
    DATA: t_ekkn TYPE TABLE OF t_ekkn,
          t_ekkn_wa TYPE t_ekkn.
    FIELD-SYMBOLS: <t_ekkn> TYPE t_ekkn.
    SELECT * FROM EKKN
    INTO TABLE t_ekkn
    WHERE PS_PSP_PNR = WBS_TAB-INTNO
    AND EBELN IN S_PO
    AND KOKRS = P_KOKRS.
    Loop at t_ekkn assigning <t_ekkn>.
    Copy your existing logic between SELECT & ENDSELECT of EKKN
    Endloop.
    I hope this helps,
    Regards
    Raju Chitale

  • How to check the performance of the server in oracle applications 11i

    hii everybody,
    i want to know,how to check the performance of the system(test server) using oracle applications 11i.your help highly appreciated,thanks.

    938946 wrote:
    hii everybody,
    i want to know,how to check the performance of the system(test server) using oracle applications 11i.your help highly appreciated,thanks.Please see old threads for the same topic/discussion -- https://forums.oracle.com/forums/search.jspa?threadID=&q=Performance+AND+Tuning&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

Maybe you are looking for

  • No Camera Roll Folder?

    I have been looking for an answer for about a few months now. I seen some similar to this problem but nothing quite like mine. So basically I take pictures with my iPhone camera. When I hit the "Photos" application I have 1 album which is called "pro

  • Creating Query to show items from open sales orders with a/p invoice

    Hi experts, I am trying to create a query that will show what items/quantities are still in open sales orders that can now be filled by an incoming shipment of goods, processed through the a/p invoice. This needs to be done using subqueries, which I

  • How to create an object ONLY IF a condition is true

    I hope this is the correct place to post this....*takes deep breath*: I am writing a fairly basic program in NetBeans. The following example will simplify what I wish to convey, and ask for advice about: Imagine a program consisting of several classe

  • Server Startup - log4j:WARN Failure in post-close rollover action

    Hi, Could anyone kindly help me to fix this issue?? We are Migrating Weblogic from 11g 10.3.2 to 10.3.6 After starting the server and checking the log, it keeps on prints "log4j:WARN Failure in post-close rollover action" in the log for several time.

  • ClassNotFound error when loading applet from a NTLM authenticated  site

    Hi, I wrote a Java applet and put it into a JAR file and signed the JAR file. It works fine if the user doesn't need to be authenticated. However, when I place the same JAR to a site that uses NTLM (NT challenging) authentication. The applet failed t