Performance tuning in merge command

HI
My merge statement takes 45 mins to merge source table to target
below is execution plan
This is no of rows merged
906703 rows merged.
later I need to merge every day stage table to traget table -- 14701358 no of rows
I suspect this will take more than two hrs how i can improve this
My merge syntax as follows
MERGE /*+ INDEX_FFS(s idx_pis_test1a_branchcode idx_pis_test1a_invoiceno idx_pis_test1a_vouchertype idx_pis_test1a_shpmtno ) */ into scott.pis_test1_A s
using
(select * from scott.pis_test11) t
on
(s.BRANCH_CODE =t.BRANCH_CODE
and nvl(s.shpmt_no,'X')=nvl(t.shpmt_no,'X')
and s.invoice_no=t.invoice_no
and s.VOUCHER_TYPE=t.VOUCHER_TYPE
and s.suffix_invoice=t.suffix_invoice
and TRIM(s.suffix_shpmt)=TRIM(t.suffix_shpmt))
when not matched
then
INSERT
values
commit
Execution Plan
0 MERGE STATEMENT Optimizer=ALL_ROWS (Cost=32310 Card=1115245
Bytes=649072590)
1 0 MERGE OF 'PIS_TEST1_A'
2 1 VIEW
3 2 HASH JOIN (RIGHT OUTER) (Cost=32310 Card=1115245 Bytes
=630113425)
4 3 TABLE ACCESS (BY INDEX ROWID) OF 'PIS_TEST1_A' (TABL
E) (Cost=827 Card=658889 Bytes=188442254)
5 4 INDEX (FULL SCAN) OF 'IDX_PIS_TEST1A_BRANCHCODE' (
INDEX) (Cost=26 Card=658889)
6 3 TABLE ACCESS (FULL) OF 'PIS_TEST1' (TABLE) (Cost=674
6 Card=1115245 Bytes=311153355)

Hi Justin
my ans as below
1) Are your statistics accurate and up to date?
No i did not gather stats , itry with stats in target table no improvement
2) Why do you have to hint the query? What happens if you remove the hint?
if i take out the hint it take bit longer
3) Why are you merging 14 million rows every day? Are you sure that you have to update the existing
rows and that you can't just load each days records into a new partition with a new effective date?
yes i need to load 14 million records every daye and merge with target table everyday
the reason i cannot get one day records , the txt file come with appended records (whole years data in text file)
currently in my merge there is no update only insert
Justin
Hi greg
my asn as below
As Justin mentioned, this index hint seems unlikely to help matters
(is this hint even syntactically correct anyway?). Depending on your responses to
Justin's questions and the number of columns you are updating,
you could also consider adding a condition(s) to the ON clause that specifically
checks that the columns you want to update are actually different. The actual act of updating
can be a lot slower than just checking for differences.
AND s.col1 != t.col1
-- Iam not update at all only insert
If you are running this one time a day only, you could also consider a /*+ parallel */ hint (or hints) to speed things up.
I cannot use palallel & append command in hint because i only use insert in merge
If i use palallel & append hint it corrupted the index due to i use insert only in merge
rds
ak

Similar Messages

  • IIR 2.8.0.7 performance tuning suggestions / documents for Oracle 11?

    Would we have any hints or white papers that would support a customer in IIR matching server tuning for initial load performance,
    beyond the Siebel specific
    Performance Tuning Guidelines for Siebel CRM Application on Oracle Database (Doc ID 781927.1)
    which does NOT generate any statistics on the Informatica Schema?
    Customer is starting production data load into Siebel UCM of over 5 million customer records . Their current bottle neck seems to be IIR queries and high IIR host resources usage.
    This would be for Siebel 8.1.1.4 [21225] on Oracle 11.1.0.6; I currently do not know if ACR 475 with its EBC access is used or not; I'd be looking for any performance tuning suggestions on the Informatica & database side - I have not found anything helpful in the informatica knowledgebase and in the 2.8.0.7 docs the only performance tuning suggestions seem to be on IDT loads.
    Obviously performance can be influenced by the matching fields used, but this customer will be looking for performance tuning suggestions keeping the matching fields and thresholds they got approved from the business side.
    Any documents we could share?

    Hi Varad,
    Well, Oracle Metalink actually got it fixed for me! Got to give them credit.
    I ran the 1st bit of SQL they sent me and it fixed it so I think it was only cosmetic. I've enclosed all of their response in case others may find themselves in similar situation.
    Thanks again for YOUR help too.
    Perry
    ==========================================================
    1. Do you see any invalid objects in the database?
    2. Please update the SR with the output of running the commands below
    1.Connect as SYS.
    set serveroutput on (This will let you see if any check fails)
    exec validate_apex; (If your version is 2.0 or above)
    If all are fine, the registry should be changed to VALID for APEX and you should see the following
    message:
    PL/SQL procedure successfully completed.
    Note : The procedure validate_apex should always complete successfully.
    With serveroutput on, it should show why Application Express is listed as invalid.It should show output like:
    FAILED CHECK FOR <<obect_name>>
    Or
    FAILED EXISTENCE CHECK FOR <<object_name>>

  • Performance Tuning on PL/sql

    Dear all,
    I am not sure whether I am right to post this enquiry here, please correct me if I am wrong.
    I have a sql stmt that run for a long time and caused a error of 'out of temp sapce' in oracle server. How can I tune my sql for better performance using command 'EXPLAIN PLAN'? How could I know the details information for those columns in the table 'PLAN_TABLE'?
    Best Regards,
    Marius

    Read the "Database Performance Tuning Guide and Reference" for your version of Oracle (available online, right here).
    Richard

  • Can anyone send tutor for performance tuning?

    can anyone send tutor for performance tuning?I like to chk my coding.

    1.      Unused/Dead code
    Avoid leaving unused code in the program. Either comment out or delete the unused situation. Use program --> check --> extended program to check for the variables, which are not used statically. 
    2.      Subroutine Usage
    For good modularization, the decision of whether or not to execute a subroutine should be made before the subroutine is called. For example:  
    This is better:
    IF f1 NE 0.
      PERFORM sub1.
    ENDIF. 
    FORM sub1.
    ENDFORM.  
    Than this:
    PERFORM sub1.
    FORM sub1.
      IF f1 NE 0.
      ENDIF.
    ENDFORM. 
    3.      Usage of IF statements
    When coding IF tests, nest the testing conditions so that the outer conditions are those which are most likely to fail. For logical expressions with AND , place the mostly likely false first and for the OR, place the mostly likely true first. 
    Example - nested IF's:
      IF (least likely to be true).
        IF (less likely to be true).
         IF (most likely to be true).
         ENDIF.
        ENDIF.
       ENDIF. 
    Example - IF...ELSEIF...ENDIF :
      IF (most likely to be true).
      ELSEIF (less likely to be true).
      ELSEIF (least likely to be true).
      ENDIF. 
    Example - AND:
       IF (least likely to be true) AND
          (most likely to be true).
       ENDIF.
    Example - OR:
            IF (most likely to be true) OR
          (least likely to be true). 
    4.      CASE vs. nested Ifs
    When testing fields "equal to" something, one can use either the nested IF or the CASE statement. The CASE is better for two reasons. It is easier to read and after about five nested IFs the performance of the CASE is more efficient. 
    5.      MOVE statements
    When records a and b have the exact same structure, it is more efficient to MOVE a TO b than to  MOVE-CORRESPONDING a TO b.
    MOVE BSEG TO *BSEG.
    is better than
    MOVE-CORRESPONDING BSEG TO *BSEG. 
    6.      SELECT and SELECT SINGLE
    When using the SELECT statement, study the key and always provide as much of the left-most part of the key as possible. If the entire key can be qualified, code a SELECT SINGLE not just a SELECT.   If you are only interested in the first row or there is only one row to be returned, using SELECT SINGLE can increase performance by up to three times. 
    7.      Small internal tables vs. complete internal tables
    In general it is better to minimize the number of fields declared in an internal table.  While it may be convenient to declare an internal table using the LIKE command, in most cases, programs will not use all fields in the SAP standard table.
    For example:
    Instead of this:
    data:  t_mara like mara occurs 0 with header line.
    Use this:
    data: begin of t_mara occurs 0,
            matnr like mara-matnr,
            end of t_mara. 
    8.      Row-level processing and SELECT SINGLE
    Similar to the processing of a SELECT-ENDSELECT loop, when calling multiple SELECT-SINGLE commands on a non-buffered table (check Data Dictionary -> Technical Info), you should do the following to improve performance:
    o       Use the SELECT into <itab> to buffer the necessary rows in an internal table, then
    o       sort the rows by the key fields, then
    o       use a READ TABLE WITH KEY ... BINARY SEARCH in place of the SELECT SINGLE command. Note that this only make sense when the table you are buffering is not too large (this decision must be made on a case by case basis).
    9.      READing single records of internal tables
    When reading a single record in an internal table, the READ TABLE WITH KEY is not a direct READ.  This means that if the data is not sorted according to the key, the system must sequentially read the table.   Therefore, you should:
    o       SORT the table
    o       use READ TABLE WITH KEY BINARY SEARCH for better performance. 
    10.  SORTing internal tables
    When SORTing internal tables, specify the fields to SORTed.
    SORT ITAB BY FLD1 FLD2.
    is more efficient than
    SORT ITAB.  
    11.  Number of entries in an internal table
    To find out how many entries are in an internal table use DESCRIBE.
    DESCRIBE TABLE ITAB LINES CNTLNS.
    is more efficient than
    LOOP AT ITAB.
      CNTLNS = CNTLNS + 1.
    ENDLOOP. 
    12.  Performance diagnosis
    To diagnose performance problems, it is recommended to use the SAP transaction SE30, ABAP/4 Runtime Analysis. The utility allows statistical analysis of transactions and programs. 
    13.  Nested SELECTs versus table views
    Since releASE 4.0, OPEN SQL allows both inner and outer table joins.  A nested SELECT loop may be used to accomplish the same concept.  However, the performance of nested SELECT loops is very poor in comparison to a join.  Hence, to improve performance by a factor of 25x and reduce network load, you should either create a view in the data dictionary then use this view to select data, or code the select using a join. 
    14.  If nested SELECTs must be used
    As mentioned previously, performance can be dramatically improved by using views instead of nested SELECTs, however, if this is not possible, then the following example of using an internal table in a nested SELECT can also improve performance by a factor of 5x:
    Use this:
    form select_good.
      data: t_vbak like vbak occurs 0 with header line.
      data: t_vbap like vbap occurs 0 with header line.
      select * from vbak into table t_vbak up to 200 rows.
      select * from vbap
              for all entries in t_vbak
              where vbeln = t_vbak-vbeln.
      endselect.
    endform.
    Instead of this:
    form select_bad.
    select * from vbak up to 200 rows.
      select * from vbap where vbeln = vbak-vbeln.
      endselect.
    endselect.
    endform.
    Although using "SELECT...FOR ALL ENTRIES IN..." is generally very fast, you should be aware of the three pitfalls of using it:
    Firstly, SAP automatically removes any duplicates from the rest of the retrieved records.  Therefore, if you wish to ensure that no qualifying records are discarded, the field list of the inner SELECT must be designed to ensure the retrieved records will contain no duplicates (normally, this would mean including in the list of retrieved fields all of those fields that comprise that table's primary key).
    Secondly,  if you were able to code "SELECT ... FROM <database table> FOR ALL ENTRIES IN TABLE <itab>" and the internal table <itab> is empty, then all rows from <database table> will be retrieved.
    Thirdly, if the internal table supplying the selection criteria (i.e. internal table <itab> in the example "...FOR ALL ENTRIES IN TABLE <itab> ") contains a large number of entries, performance degradation may occur.
    15.  SELECT * versus SELECTing individual fields
    In general, use a SELECT statement specifying a list of fields instead of a SELECT * to reduce network traffic and improve performance.  For tables with only a few fields the improvements may be minor, but many SAP tables contain more than 50 fields when the program needs only a few.  In the latter case, the performace gains can be substantial.  For example:
    Use:
    select vbeln auart vbtyp from table vbak
      into (vbak-vbeln, vbak-auart, vbak-vbtyp)
      where ...
    Instead of using:
    select * from vbak where ... 
    16.  Avoid unnecessary statements
    There are a few cases where one command is better than two.  For example:
    Use:
    append <tab_wa> to <tab>.
    Instead of:
    <tab> = <tab_wa>.
    append <tab> (modify <tab>).
    And also, use:
    if not <tab>[] is initial.
    Instead of:
    describe table <tab> lines <line_counter>.
    if <line_counter> > 0. 
    17.  Copying or appending internal tables
    Use this:
    <tab2>[] = <tab1>[].  (if <tab2> is empty)
    Instead of this:
    loop at <tab1>.
      append <tab1> to <tab2>.
    endloop.
    However, if <tab2> is not empty and should not be overwritten, then use:
    append lines of <tab1> [from index1] [to index2] to <tab2>.
    P.S : Please reward if you find this useful..

  • Performance tuning required

    The table contains 2 crores of records
    Its taking lot of time to get executed.
    please suggest to improve the performance
    The execution of this query taking lot of time in the below procedure
    UPDATE ctrl_settled_shipments
    SET
    msrbnr = v_document_ids (i),
    msrdat = SYSDATE
    WHERE msdgnr = v_consignment_ids (i) AND msrbnr IS NULL;
    PROCEDURE proctest(
    data_source IN VARCHAR2,
    toll_flag IN NUMBER,
    damage_status IN NUMBER,
    execid IN NUMBER,
    msg OUT VARCHAR2
    As
    UPDATE controlling
    SET
    -- MSREKO= rec.lv_consignment_amount,
    msrbnr = v_document_ids (i),
    msrdat = SYSDATE
    WHERE msdgnr = v_consignment_ids (i) AND msrbnr IS NULL;
    lv_document_no NUMBER;
    lv_consignment_number NUMBER;
    lv_consignment_amount NUMBER;
    lv_doc_type VARCHAR2 (2);
    lv_damage_amount NUMBER;
    lv_ilnbetr NUMBER;
    lv_spedbetr NUMBER;
    lv_spedbetr_flag NUMBER;
    lv_ilnbetr_flag NUMBER;
    c_consigment_numbers billing_pkg.cursor_typ;
    TYPE t_num_array IS TABLE OF NUMBER
    INDEX BY BINARY_INTEGER;
    TYPE t_char_array IS TABLE OF VARCHAR2 (20)
    INDEX BY BINARY_INTEGER;
    v_consignment_ids t_char_array;
    v_document_ids t_num_array;
    v_doc_type_ids t_char_array;
    v_consignment_amts t_num_array;
    v_spedbetr_amts t_num_array;
    v_ilnbetr_amts t_num_array;
    v_spedbetr_flags t_num_array;
    v_ilnbetr_flags t_num_array;
    v_row_count NUMBER := 0;
    ort varchar2(50);
    cons_query varchar2(1000);
    pctx bl_plog.log_ctx
    := bl_plog.init ('BL_UPDATED_CONTROLLING', plevel => bl_plog.LINFO);--NP
    BEGIN
    pctx.lsubsection := ''||execid;
    BL_PLOG.INFO(pctx,' data_source ' || data_source);
    IF UPPER (data_source) = 'CONTROLLING' THEN
    cons_query :=
    ' SELECT document_no AS lv_document_no,
    blc.msdgnr AS lv_consignment_number,
    doc_type AS lv_doc_type,
    0 AS lv_consignment_amount,
    0 AS lv_ilnbetr,
    0 AS lv_spedbetr,
    0 AS lv_spedbetr_flag,
    0 AS lv_ilnbetr_flag
    FROM tmp_header_position_amount1,bl_controlling blc
    WHERE document_no IS NOT NULL
    and document_no = decode(doc_type,''R'',msrbnr,''G'',msgbnr)
    and blc.exec_id = '||execid;
    ELSIF UPPER (data_source) = 'BL_CONT_SCHADEN' THEN
    cons_query :=
    'SELECT document_no AS lv_document_no,
    bcs.bcs_msdgnr AS lv_consignment_number,
    doc_type AS lv_doc_type,
    decode(doc_type,''R'',bcs_msreko,''G'',bcs_msguko) AS lv_consignment_amount,
    nvl(bcs.bcs_ilnbetr,0) AS lv_ilnbetr,
    nvl(bcs.bcs_spedbetr,0) AS lv_spedbetr,
    bcs.bcs_spedbetr_flag AS lv_spedbetr_flag,
    bcs.bcs_ilnbetr_flag AS lv_ilnbetr_flag
    FROM tmp_header_position_amount1,bl_cont_schaden bcs
    WHERE document_no IS NOT NULL
    and document_no = decode(doc_type,''R'',bcs_msrbnr,''G'',bcs_msgbnr)
    and bcs.exec_id = '||execid;
    END IF;
    OPEN c_consigment_numbers FOR cons_query;
    LOOP
    FETCH c_consigment_numbers
    BULK COLLECT INTO v_document_ids, v_consignment_ids,
    v_doc_type_ids, v_consignment_amts, v_ilnbetr_amts,
    v_spedbetr_amts, v_spedbetr_flags, v_ilnbetr_flags LIMIT 200;
    EXIT WHEN v_row_count = c_consigment_numbers%ROWCOUNT;
    v_row_count := c_consigment_numbers%ROWCOUNT;
    FOR i IN 1 .. v_consignment_ids.COUNT
    LOOP
    --IF UPPER (data_source) ='CONTROLLING' AND rec.lv_doc_type = Billing_Pkg.BILL THEN
    IF UPPER (data_source) = 'CONTROLLING'
    AND v_doc_type_ids (i) = billing_pkg.bill
    THEN
    UPDATE ctrl_settled_shipments
    SET
    msrbnr = v_document_ids (i),
    msrdat = SYSDATE
    WHERE msdgnr = v_consignment_ids (i) AND msrbnr IS NULL;
    end if;
    commit;
    end loop;
    EXCEPTION
    WHEN OTHERS
    THEN
    msg:='records failed to update'||sqlerrm;
    rollback;
    end proctest;
    Edited by: 812809 on 9 Jul, 2011 5:48 AM

    You think your problem is the UPDATE? How long does a SINGLE update take? Ever tried? Did you run a trace followed by TKPROF?
    Your problem is that you use a lot of code, nested loops, dynamic SQL etc. when you can do the update with a singe MERGE command, which will reduce to less than 10% of your code and be VERY much faster.
    something like this. (If I got the idea of your code correct)
    MERGE INTO ctrl_settled_shipments X
    USING (
    SELECT document_no AS lv_document_no,
       blc.msdgnr AS lv_consignment_number,
       doc_type AS lv_doc_type,
       s.rowid rid
    FROM tmp_header_position_amount1,
          bl_controlling blc,
           ctrl_settled_shipments s
    WHERE document_no IS NOT NULL
       and document_no = decode(doc_type,''R'',msrbnr,''G'',msgbnr)
    and blc.exec_id = execid
    and s.msdgnr = blc.msdgnr AND s.msrbnr IS NULL) Y
    on x.rowid = y.rid
      WHEN MATCHED THEN UPDATE
       msrbnr = lv_document_no,
       msrdat = SYSDATE;

  • Report running for long time & performance tuning

    Hi All,
    (1). WebI report is running for long time.so what are the steps i need to check for it ?
    (2). Can you tell me about performance tuning in BO ?
    please help me.....
    Thanks
    Kumar

    (1). WebI report is running for long time.so what are the steps i need to check for it ?
    The first step is to see if the problem lies in the query on the data source or in webi itself. Depending on the data source there are different ways to extract the query and try to run it against the database. Which source does your report uses?
    (2). Can you tell me about performance tuning in BO ?
    I would recommend to start by reading the administrator's guide. There is a section about how to improve performance.
    Regards,
    Stratos

  • Oracle  11g Performance tuning approach ?

    Hello Experts,
    Is it the right forum to follow oracle performance tuning discussions ? If not, let me know what will be the forum to pick up some thread on this subject.
    I am looking for performance tuning approach for oracle 11g. I learned there are some new items in 11g in this regard. For persons, who did tuning in earlier versions of Oracle,
    what will be the best way adopt to 11 g?
    I reviewed the 11g performance tuning guide, but I am looking for some white papers/blogs with case studies and practical approaches. I hope that you have used them.
    What are the other sources to pick up some discussions?
    Do you mind, share your thoughts?
    Thanks in advance.
    RI

    The best sources of information on performance tuning are:
    1. Jonathan Lewis: http://jonathanlewis.wordpress.com/all-postings/
    2. Christian Antognini: http://www.antognini.ch/
    3. Tanel Poder: http://blog.tanelpoder.com/
    4. Richard Foote: http://richardfoote.wordpress.com/
    5. Cary Millsap: http://carymillsap.blogspot.com/
    and a few dozen others whose blogs you will find cross-referenced in those above.

  • Performance tuning of BPEL processes in SOA Suite 11g

    Hi,
      We are working with a customer for performance tuning of SOA Suite 11g, one of the areas is to tune the BPEL processes. I am new to this and started out with stress testing Hello World process using SOAPUI tool. I would like help with the below topics -
    1. How do I interpret the statistics collected during stress testing? Do we have any benchmark set that can indicate that the performance is ok.
    2. Do we need to run stress tests for every BPEL process deployed?
    2. Is there any performance tuning strategy documentation available? Or can anybody share his/her experiences to guide me?
    Thanks in advance!
    Sritama

    1. How do I interpret the statistics collected during stress testing? Do we have any benchmark set that can indicate that the performance is ok.
    You need
    pay attention to:
    java heap usage vs java heap capacity
    java eden usage vs java eden capacity
    JDBC pool initial connections vs JDBC pool capacity connections
    if you are using linux: top
    if you are using aix: topas
    2. Do we need to run stress tests for every BPEL process deployed?
    yes, you need test each BPEL. You can use "Jmeter" tool.
    Download Jmeter from here: Apache JMeter - Apache JMeter&amp;trade;
    Other tools:
    jstat
    jstack
    jps -v
    Enterprise Manager
    WebLogic Console
    VisualVM
    JRockit Mission Control
    3. Is there any performance tuning strategy documentation available? Or can anybody share his/her experiences to guide me?
    I recommend "Oracle SOA Suite 11g Performance Tuning Cookbook" http://www.amazon.com/Oracle-Suite-Performance-Tuning-Cookbook/dp/1849688842/ref=sr_1_1?ie=UTF8&qid=1378482031&sr=8-1&keywords=oracle+soa+suite+11g+performance+tuning+cookbook

  • Issue with calling custom function in merge command -10g

    Hi,
    I have ran into issue while calling a custom function in merge command.
    It throws error 'Invalid identifier'. Oracle doesnt understand that it is a function and take the function name as column name.
    Since no such collumn name exists, it throws 'Invalid identifier'.
    Interestingly, merge command works fine when it has a oracle function (replace, decode).
    The oracle version is 10.2.0.3
    It is very urgent.
    Any pointers will be helpful.
    Regards,
    Ravi

    I don't have privileges to create dblink, but this is working for me.
    So, i don't think function can be a issue here.
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Elapsed: 00:00:01.02
    satyaki>
    satyaki>
    satyaki>create table hist_tab
      2     as
      3       select * from emp
      4       where sal between 2000 and 4000;
    Table created.
    Elapsed: 00:00:00.09
    satyaki>
    satyaki>select * from hist_tab;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
          7844 TURNER     SALESMAN        7698 08-SEP-81       2178          0         30 SALESMAN
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>
    satyaki>update hist_tab
      2     set mgr = 7794;
    1 row updated.
    Elapsed: 00:00:00.01
    satyaki>
    satyaki>commit;
    Commit complete.
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>select * from hist_tab;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
          7844 TURNER     SALESMAN        7794 08-SEP-81       2178          0         30 SALESMAN
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>
    satyaki>
    satyaki>
    satyaki>create table tran_tab
      2     as
      3       select * from emp
      4       where sal between 2000 and 7000;
    Table created.
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>select * from tran_tab;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
          7844 TURNER     SALESMAN        7698 08-SEP-81       2178          0         30 SALESMAN
          7902 FORD       ANALYST         7566 03-DEC-81    5270.76                    20 ANALYST
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>ed
    Wrote file afiedt.buf
      1  create or replace function fun(c_in number)
      2     return number
      3     is
      4       c_out number(4);
      5     begin
      6       if c_in < 7900 then
      7          c_out := 0;
      8       else
      9         c_out := 1;
    10       end if;
    11       return c_out;
    12*    end;
    13  /
    Function created.
    Elapsed: 00:00:01.00
    satyaki>
    satyaki>merge into hist_tab o
      2  using (
      3     select empno,
      4            ename,
      5            job,
      6            mgr,
      7            hiredate,
      8            sal,
      9            comm,
    10            deptno,
    11            job1,
    12            dob
    13     from (
    14              select k.*,
    15                     rank() over(order by fun(k.empno)) rn
    16              from tran_tab k
    17          )
    18     where rn = 1
    19     ) n
    20  on ( o.empno = n.empno)
    21  when matched then
    22    update set o.ename = n.ename,
    23               o.job = n.job,
    24               o.mgr = n.mgr,
    25               o.hiredate = n.hiredate,
    26               o.sal = n.sal,
    27               o.comm = n.comm,
    28               o.deptno = n.deptno,
    29               o.job1 = n.job1,
    30               o.dob = n.dob
    31  when not matched then
    32    insert(
    33            o.empno,
    34            o.ename,
    35            o.job,
    36            o.mgr,
    37            o.hiredate,
    38            o.sal,
    39            o.comm,
    40            o.deptno,
    41            o.job1,
    42            o.dob
    43          )
    44    values(
    45            n.empno,
    46            n.ename,
    47            n.job,
    48            n.mgr,
    49            n.hiredate,
    50            n.sal,
    51            n.comm,
    52            n.deptno,
    53            n.job1,
    54            n.dob
    55          );
    1 row merged.
    Elapsed: 00:00:00.03
    satyaki>
    satyaki>select * from hist_tab;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
          7844 TURNER     SALESMAN        7698 08-SEP-81       2178          0         30 SALESMAN
    Elapsed: 00:00:00.00
    satyaki>You can check the final output with old output. It is working perfectly - i guess.
    Regards.
    Satyaki De.

  • Performance tuning related issues

    hi experts
      i am new to performance tuning application. can any one share some stuff(bw3.5& bi7)related to the concern area.send any relavent docs to my id: [email protected] .
      thanks in advance
    regards
    gavaskar
    [email protected]

    hi Gavaskar,
    check this, you can download lot of performance materials
    Business Intelligence Performance Tuning [original link is broken]
    and e-learning -> intermediate course and advance course
    https://www.sdn.sap.com/irj/sdn/developerareas/bi?rid=/webcontent/uuid/fe5b0b5e-0501-0010-cd88-c871915ec3bf [original link is broken]
    e.g
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/10b589ad-0701-0010-0299-e5c282b7aaad
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/d9fd84ad-0701-0010-d9a5-ba726caa585d
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/8e6183ad-0701-0010-e083-9ab1c6afe6f2
    performance tools in bw 3.5
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/07a4f070-0701-0010-3b91-a6bf7644c98f
    (here also you can download the presentation by righ click the disk drive icon)
    hope this helps.

  • [ADF-11.1.2] Proof of view performance tuning in oracle adf

    Hello,
    Take an example of : http://www.gebs.ro/blog/oracle/adf-view-object-performance-tuning-analysis/
    It tells me perfectly how to tune VO to achieve performance, but how to see it working ?
    For example: I Set Fetch size of 25, 'in Batch of' set to 1 or 26 I see following SQL Statement in Log
    [1028] SELECT Company.COMPANY_ID,         Company.CREATED_DATE,         Company.CREATED_BY,         Company.LAST_MODIFY_DATE,         Company.LAST_MODIFY_BY,         Company.NAME FROM COMPANY Companyas if it is fetching all the records from table at a time no matter what's the size of Batch. If I am seeing 50 records on UI at a time, then I would expect at least 2 SELECT statement fetching 26 records by each statement if I set Batch Size to 26... OR at least 50 SELECT statement for Batch size set to '1'.
    Please tell me how to see view performance tuning working ? How one can say that setting batch size = '1' is bad for performance?

    Anandsagar,
    why don't you just read up on http://download.oracle.com/docs/cd/E21764_01/core.1111/e10108/adf.htm#CIHHGADG
    there are more factors influencing performance than just query. Btw, indexing your queries also helps to tune performance
    Frank

  • Performance tuning in PL/SQL code

    Hi,
    I am working on already existing PL/SQL code which is written by someone else on validation and conversion of data from a temporary table to base table. It usually has 3.5 million rows. and the procedure takes arount 2.5 - 3 hrs to complete.
    Can I enhance the PL/SQL code for better performance ? or, is this OK to take so long to process these many rows?
    Thanks!
    Yogini

    Can I enhance the PL/SQL code for better performance ? Probably you can enhance it.
    or, is this OK to take so long to process these many rows? It should take a few minutes, not several hours.
    But please provide some more details like your database version etc.
    I suggest to TRACE the session that executes the PL/SQL code, with WAIT events, so you'll see where and on what time is spent, you'll identify your 'problem statements very quickly' (after you or your DBA have TKPROF'ed the trace file).
    SQL> alter session set events '10046 trace name context forever, level 12';
    SQL> execute your PL/SQL code here
    SQL> exitWill give you a .trc file in your udump directory on the server.
    http://www.oracle-base.com/articles/10g/SQLTrace10046TrcsessAndTkprof10g.php
    Also this informative thread can give you more ideas:
    HOW TO: Post a SQL statement tuning request - template posting
    as well as doing a search on 10046 at AskTom, http://asktom.oracle.com will give you more examples.
    and reading Oracle's Performance Tuning Guide: http://www.oracle.com/pls/db102/to_toc?pathname=server.102%2Fb14211%2Ftoc.htm&remark=portal+%28Getting+Started%29

  • Performance tuning in t

    hi,
    I have to do perofrmance for one program, it is taking 67000 secs in back ground for execution and 1000 secs for some varints .It is an  ALV report.
    please suggest me how to proced to change the code.

    Performance tuning for Data Selection Statement
    <b>http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm</b>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.

  • Performance tuning in CRM server

    Hi everyone,
       My CRM server working very slow. Idont know the exact reason. My server configuration IBM Xeon processor 3 Ghz 3GB RAM.There are about 25 users. Is this problem with SAP or Hardware.If any one have performance tuning document plz post it.
    Thanks,
    Murali

    Chech the following:-
    Processor usage
    Ram usage
    background jobs
    how many user at a time
    what kind of job they do
    Any Network Problem
    Increse Work Processor
    increase Virtual Ram
    And for 25 users, You need System with 2 CPU and 4 Gb Ram
    Regards

  • Performance tuning in XI, (SAP Note 857530 )

    Could any one pls tell me where to find sap notes.
    I am looking for "SAP Note 857530 "
    Integration process performance(in sap XI).
    or how can I view the performance of the integration process ? or exactly how performance tuning is done.
    pls help,
    Best regards,
    verma.

    Hi,
    SAP Note:
    Symptom
    Performance bottlenecks when executing integration processes.
    Other terms
    ccBPM
    BPE
    Performance
    Integration Processes
    Solution
    This note refers to all notes that are concerned with improving the performance of the ccBPM runtime.
    This note will be continually updated as improvements are made.
    Also read the document "Checklist: Making Correct Use of Integration Processes" in the SAP Library documentation, on SAP Service Marketplace, and in SDN; it contains information about performance issues to bear in mind when you model integration processes.
    Refer to the appended notes and maintain the default code changes by using SNOTE, or by importing the relevant service packs. Note that some performance improvements cannot be implemented by using SNOTE and are instead only available in service packs.
    Regards
    vijaya

Maybe you are looking for

  • How to attach files in a mail from user4s PC in a Portal aplication

    Hello, I am trying to send a mail with attachments from PL/SQL but I don4t know what must I do to attach files from the user's PC. Our aplication is developed with Portal. Does anybody knows any java program than can be used like portlet who opens th

  • How can I change the font in emails sent on my ipad or at least have it retain the font I copy

    How can I change the font in emails sent on my ipad or at least have the email retain the font that I copy & paste into it?

  • Configure between tomacat 5.1 to weblogic 8.1

    Hi All Please help on this topic how to call EJB from my servlet program suppose in my servlet program , i want to validate the username and password in database ,, through i am calling the EJB Client , how to configure to call the EJB Application,,

  • Plant Authorization

    Hi,   I was trying to restrict the user to get data for spefic plant . Is their a std approach to do this. I would like to have this restriction to custom programs/reports only. Awaiting a reply

  • Submitting Report to Apple

    I had my hard drive replaced last year on my 2.4 GHz Intel Core 2 Duo, 2 GB 667 MHz DDR2 SDRAM MAC running OSX V10.5.8.  Ever since, when I attept to submit a crash report to apple, It will not allow me to.  Says unable to submit report at this time.