Merge vs Insert & Update Performance Comparison

I am trying to do an insert and update to the target table from source table (oracle 11g).Its OLTP.Merge will be better or Insert & Update will be better..

Hi,
Welcome to the forum!
user3893088 wrote:
I am trying to do an insert and update to the target table from source table (oracle 11g).Its OLTP.Merge will be better or Insert & Update will be better..No one can say whether one will necessarily be better than the other, especially without seeing exactly what you're doing.
For performance questions, see the forum FAQ
SQL and PL/SQL FAQ
#3 "How to improve the performance"
I would guess that MERGE would be faster, because it only needs to scan the source table once. MERGE will proably be simpler to code, and easier to read and understand as well, so maintenance will take less time.

Similar Messages

  • JDBC XMLType Insert/Update Performance

    I am writing a backend Java EE application that inserts or updates XML documents into a table backed by XMLType.  I'm using Oracle 11.2.0.3 with associated drivers and XDK, with connections obtained from an oracle.jdbc.poo.OracleDataSource.  Unfortunately, I can't get my application to perform faster than 7 transactions a second, with or without JDBC batching.  I've tried several different table structures; here are the two that have shown the most promise:
    CREATE TABLE mrbook_raw
      id  RAW(16),
      created_date TIMESTAMP,
      last_modified_ts TIMESTAMP,
      bk_typ_cd VARCHAR2(16),
      bk_invt XMLType,
      PRIMARY KEY(id),
      FOREIGN KEY (id) REFERENCES mrbook(id)
    ) XMLTYPE COLUMN bk_invt ELEMENT "http://www.mrbook.com/BookData/Vers1#BK_INVT";
    --Also tried the below...
    CREATE TABLE book_master OF XMLTYPE
    XMLTYPE STORE AS SECUREFILE BINARY XML
    VIRTUAL COLUMNS
      isbn_nbr AS ( XmlCast(
                    XmlQuery('declare namespace plh="http://www.mrbook.com/BookData/Vers1/Header";
                              declare namespace bk_invt="www.mrbook.com/BookData/Vers1/InventoryData";
                              /bk_invt:BK_INVT/plh:HDR/plh:ISBN_NBR'
                              PASSING object_value RETURNING CONTENT) AS VARCHAR2(64)) ),
      book_id AS ( XmlCast(
                    XmlQuery('declare namespace plh="http://www.mrbook.com/BookData/Vers1/Header";
                              declare namespace invtdata="http://www.mrbook.com/BookData/Vers1/InventoryData";
                              /bk_invt:BK_INVT/plh:HDR/plh:BOOK_ID'
                              PASSING object_value RETURNING CONTENT) AS VARCHAR2(64)) )
    Here is the code that inserts into the first table:
        private static final String INS_MRBOOK_RAW =
                "INSERT INTO MRBOOK_RAW " +
                        "(id, bk_invt, last_modified_ts, created_date) " +
                "VALUES (?, ?, ?, ?)";
        private static final String UPD_MRBOOK_RAW =
                "UPDATE MRBOOK_RAW " +
                "SET " +
                    "bk_invt = ?, " +
                    "last_modified_ts = ? " +
                "WHERE id = ?";
    protected void updateBookRaw(BookRecord record, Connection con)
            PreparedStatement stmt = null;
            SQLXML sqlxml = null;
            Timestamp now = new Timestamp(System.currentTimeMillis());
            try
                stmt = con.prepareStatement(UPD_MRBOOK_RAW);
                sqlxml = con.createSQLXML();
                DOMResult result = sqlxml.setResult(DOMResult.class);
                result.setNode(record.getExistingInvtData());
                stmt.setSQLXML(1, sqlxml);
                stmt.setTimestamp(2, now);
                stmt.setBytes(3, record.getId());
                stmt.executeUpdate();
            catch(SQLException e)
                throw new RuntimeException(e);
            finally
                if(sqlxml != null)
                    try
                        sqlxml.free();
                    catch(SQLException e)
                        log.error("Unable to free SQLXML!", e);
                if(stmt != null)
                    try
                        stmt.close();
                    catch(SQLException e)
                        log.error("Unable to close statement!", e);
        protected void insertBookRaw(BookRecord record, Connection con)
            PreparedStatement stmt = null;
            SQLXML sqlxml = null;
            Timestamp now = new Timestamp(System.currentTimeMillis());
            XMLDocument bookDoc = parser.getInvtDataDoc(record.getNewBook());
            try
                stmt = con.prepareStatement(INS_MRBOOK_RAW);
                sqlxml = con.createSQLXML();
                DOMResult domResult = sqlxml.setResult(DOMResult.class);
                domResult.setNode(bookDoc);
                stmt.setBytes(1, record.getId());
                stmt.setSQLXML(2, sqlxml);
                stmt.setTimestamp(3, now);
                stmt.setTimestamp(4, now);
                stmt.executeUpdate();
            catch(SQLException e)
                throw new RuntimeException(e);
            finally
                if(sqlxml != null)
                    try
                        sqlxml.free();
                    catch(SQLException e)
                        log.error("Unable to free SQLXML object!", e);
                if(stmt != null)
                    try
                        stmt.close();
                    catch(SQLException e)
                        log.error("Unable to close statement!", e);
    I've tried every storage method possible; CLOBs, Binary XMLType, and structured storage, but I just cannot get the application to go faster than 7 records/second.
    I understand that this may or may not be an XMLType question, but I don't know where to start.  From everything above, it looks like I should be getting good performance inserting and updating XMLType records; and I do indeed get pretty good performance from retrieval, but not from insert or update.  Does anyone have any suggestions on what I might try or a reference I might look at to start?

    Perhaps a more specific question... should I use PreparedStatements with SQLXML or should I use the OracleXMLSave class?  Are SQLXML types batchable under Oracle?

  • Can you create nested condition in merge(e.g. insert/update) using owb

    Hi,
    Does OWB9iR2 allow you to build in nested condition in merge. such as
    If no match on col1 and col2 then
    if col3 match then no new sequence insert <---
    else insert new sequence;
    else (there is match on col1 and col2)
    update col3 and sequence.
    I have an incremental load for a lookup table, where insert/update is used. There are two match columns and surrogate key is used. When there is no match, it shall not insert a sequence when there is a match on third column. I can not use the 3rd column in the original match because it shall be updated where there is a match for the two match column.
    I am trying to avoid using transformant for performance impact. Thanks

    HIi I think the misleading thing is that in PL/SQL you can use booleans, which is not possible in SQL. So in a PL/SQL tranformation, this is OK:
    a:= case when not orgid_lkup( INGRP1.ORG_ID )
    then get_supid(..)
    else ...
    but, the following SQL does not work:
    select case when not orgid_lkup( INGRP1.ORG_ID )
    then get_supid(..)
    else ...
    into a
    from dual;
    I ended up using only 0/1 as boolean return values for these reasons;
    so I can have:
    select
    case when orgid_lkup( INGRP1.ORG_ID ) = 0 then ...
    though true booleans are better if you don't have to embed them in SQL.
    Antonio

  • Merge to Insert or update records in SQL Database

    Hello ,
    I am having hard time with creating a Stored Procedure to insert/update the selected records from Oracle data base to SQL database using BizTalk.
    ALTER PROCEDURE [dbo].[uspInsertorUpdateINF]
    @dp_id char(32),
    @dv_id char(32),
    @em_number char(12),
    @email varchar(50),
    @emergency_relation char(32),
    @option1 char(16),
    @status char(20),
    @em_id char(35),
    @em_title varchar(64),
    @date_hired datetime
    AS
    BEGIN
    SET NOCOUNT ON;
    MERGE [dbo].[em] AS [Targ]
    USING (VALUES (@dp_id, @dv_id , @em_number, @email, @emergency_relation, @option1, @status, @em_id, @em_title, @date_hired))
    AS [Sourc] (dp_id, dv_id, em_number, email, emergency_relation, option1, status, em_id, em_title, date_hired)
    ON [Targ].em_id = [Sourc].em_id
    WHEN MATCHED THEN
    UPDATE SET dp_id = [Sourc].dp_id,
    dv_id = [Sourc].dv_id,
    em_number = [Sourc].em_number,
    email = [Sourc].email,
    emergency_relation = [Sourc].emergency_relation,
    option1 = [Sourc].option1,
    status = [Sourc].status,
    em_title = [Sourc].em_title,
    date_hired = [Sourc].date_hired
    WHEN NOT MATCHED BY TARGET THEN
    INSERT (dp_id, dv_id, em_number, email, emergency_relation, option1, status, em_id, em_title,date_hired)
    VALUES ([Sourc].dp_id, [Sourc].dv_id, [Sourc].em_number, [Sourc].email, [Sourc].emergency_relation, [Sourc].option1, [Sourc].status, [Sourc].em_id, [Sourc].em_title, [Sourc].date_hired);
    END;
    I am getting an error like
    WcfSendPort_SqlAdapterBinding_
    TypedProcedures_dbo_Custom" with URL "mssql://abc//def?". It will be retransmitted after the retry interval specified for this Send Port. Details:"System.Data.SqlClient.SqlException (0x80131904): Procedure or function 'uspInsertorUpdateINF'
    expects parameter '@dp_id', which was not supplied
    I cannot give the Oracle Database name directly in the stored Procedure
    I am stuck with this, and cannot figure out since I am new to SQL Queries and Stored Procedures. Any help is greatly appreciated.
    Thanks

    Hi sid_siv,
    Only the first record is inserted because of the scalar variables of the stored procedure(SP), when you call the SP, only one row is passed. To get all rows inserted, you can either declare a
    table-valued parameter
    (TVP) for the SP or using an Oracle linked server in the SP.
    Create a stored procedure with a table-valued parameter
    As you mentioned linked server is not good in your case, then TVP SP can be the only option. Regarding how to call a SP with TVP parameter in BizTalk, that's a typically BizTalk question then. I would suggest you post your question in a dedicated
    BizTalk Server forum. It is more appropriate and more experts will assist you.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • How to perform insert, update and delete in a table component

    hi all,
    i am using a table component in my page. I want to retreive data from multiple tables as well as perform insertion, updation and deletion operation.The changes should be affected in the corresponding tables. can anyone provide a solution for my problem.
    Thanks in advance
    regards,
    prasant

    There is a great tutorial for insert, update and delete records in a table.
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/inserts_updates_deletes.html
    Hope it helps.
    Thanks,
    Moumita

  • Oracle RAC - Not getting performance(TPS) as we expect on insert/update

    Hi All,
    We got a problem while executing insert/update and delete queries with Oracle RAC system, we are not getting the TPS as we expected in Oracle RAC. The TPS of Oracle RAC (for insert/update and delete ) is less than as that of
    single oracle system.
    But while executing select queries, we are getting almost double TPS as that of Single Oracle System.
    We have done server side and client side load balancing.
    Can anyone knows to solve this strange behaviour? Shall we need to perform any other settings in ASM/ Oracle Nodes
    for better performance on insert/update and delete queries.
    The following is the Oracle RAC configuration
    OS & Hardware :Windows 2008 R2 , Core 2 Du0 2.66GHz , 4 GB
    Software : Oracle 11g 64 Bit R2 , Oracle Clusterware & ASM , Microsoft iSCSI initiator.
    Storage Simulation : Xeon 4GB , 240 GB ,Win 2008 R2, Microsoft iSCSI Traget
    Please help me to solve this. We are almost stuck with this situation.
    Thanks
    Roy

    Load Profile Per Second Per Transaction Per Exec Per Call
    ~~~~~~~~~~~~ ------------------ ----------------- ----------- -----------
    DB time(s): 48.3 0.3 0.26 0.10
    DB CPU(s): 0.1 0.0 0.00 0.00
    Redo size: 523,787.9 3,158.4
    Logical reads: 6,134.6 37.0
    Block changes: 3,247.1 19.6
    Physical reads: 3.5 0.0
    Physical writes: 50.7 0.3
    User calls: 497.6 3.0
    Parses: 182.0 1.1
    Hard parses: 0.1 0.0
    W/A MB processed: 0.1 0.0
    Logons: 0.1 0.0
    Executes: 184.0 1.1
    Rollbacks: 0.0 0.0
    Transactions: 165.8
    Instance Efficiency Indicators
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Buffer Nowait %: 93.74 Redo NoWait %: 99.96
    Buffer Hit %: 99.99 Optimal W/A Exec %: 100.00
    Library Hit %: 100.19 Soft Parse %: 99.96
    Execute to Parse %: 1.09 Latch Hit %: 99.63
    Parse CPU to Parse Elapsd %: 16.44 % Non-Parse CPU: 84.62
    Shared Pool Statistics Begin End
    Memory Usage %: 75.89 77.67
    % SQL with executions>1: 71.75 69.88
    % Memory for SQL w/exec>1: 75.63 71.38

  • Insert/update - merge  apex items

    hello =)
    i want to insert data into a table and if the table has already the "List_id" i want to update values:
    begin
    FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP
    MERGE INTO list_values
    USING dual
    ON (list_values.list_id = to_number(APEX_APPLICATION.G_F02(i))
    WHEN MATCHED THEN
    UPDATE
    SET
    list_values.product_fk=:P900_PRODUCT_NAME,
    ist_values.attribute=APEX_APPLICATION.G_F04(i),
    list_values.value=APEX_APPLICATION.G_F05(i)
    WHEN NOT MATCHED THEN
    INSERT
    list_values.product_fk,list_values.attribute,list_values.value
    VALUES
    *:P900_PRODUCT_NAME,APEX_APPLICATION.G_F04(i),APEX_APPLICATION.G_F05(i)*
    end loop;
    end;
    got a lot of sql errors...
    +1+ error has occurred
    ORA-06550:line 6, column 65: PL/SQL: ORA-00907: missing right parenthesis ORA-06550: line 4, column 1: PL/SQL: SQL Statement ignored
    Maybe someone can help me with the syntax of the merge statement or maybe merge doesn't work in this case. because of the apex_items.
    also got seperated insert/update process. they work perfect, if i use the processes singly:
    Begin
    FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP
    insert into List_values (product_fk,attribute,value)
    values (:P900_PRODUCT_NAME,APEX_APPLICATION.G_F04(i),APEX_APPLICATION.G_F05(i));
    END LOOP;
    end;
    begin
    FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP
    update List_values
    set
    product_fk=:P900_PRODUCT_NAME,
    attribute=APEX_APPLICATION.G_F04(i),
    value=APEX_APPLICATION.G_F05(i)
    where list_id=to_number(APEX_APPLICATION.G_F02(i));
    END LOOP;
    end;
    Maybe someone can help me to combine them.
    Thank u =)

    You were missing a right parenthesis at the end of line 7.
    BEGIN
       FOR i IN 1 .. APEX_APPLICATION.g_f01.COUNT
       LOOP
          MERGE INTO LIST_VALUES
               USING DUAL
                  ON (LIST_VALUES.list_id =
                         TO_NUMBER (APEX_APPLICATION.g_f02 (i)))
          WHEN MATCHED
          THEN
             UPDATE SET
                LIST_VALUES.product_fk = :p900_product_name,
                ist_values.attribute = APEX_APPLICATION.g_f04 (i),
                LIST_VALUES.VALUE = APEX_APPLICATION.g_f05 (i)
          WHEN NOT MATCHED
          THEN
             INSERT     (LIST_VALUES.product_fk,
                         LIST_VALUES.attribute,
                         LIST_VALUES.VALUE)
                 VALUES (
                           :p900_product_name,
                           APEX_APPLICATION.g_f04 (i),
                           APEX_APPLICATION.g_f05 (i));
       END LOOP;
    END;Jeff

  • XML insertion/updation using merge and generate sequence number

    Hi,
    I am working on Oracle 11g.
    I have a doubt with XML load.
    I get an xml and I have to insert or update data into a table A. This I can achieve using MERGE statement.
    But there is one column in Table A, that I need to populate with a sequence number, based on the data sent in the xml.
    The xml does not send this column data.
    And I have to make sure the sequence is created based on the order in which records are present in xml.
    For example the MERGE is inserting five rows and then updating next two rows and again inserting 3 rows from xml into table A. The sequence number should be created in the same order for the column in table A.
    Also for each new xml, the sequence starts with 1 and ends with the number of records in the xml. So I cannot create a sequence and use seq.nextval.
    Please let me know, there is a way of achieveing this.
    Thank you!
    Edited by: 934451 on Aug 8, 2012 6:33 AM
    Edited by: 934451 on Aug 8, 2012 6:50 AM

    Hi,
    Following up on your previous thread : {thread:id=2403469}
    You can use the FOR ORDINALITY clause in XMLTable to generate the required sequence :
    MERGE INTO target_table t
    USING (
      SELECT x.seq_num, x.pk_id, x.col1, x.col2, ...
      FROM XMLTable(
             '/root/record'
             passing my_xml_doc
             columns seq_num FOR ORDINALITY
                   , pk_id   number       path 'ID'
                   , col1    varchar2(30) path 'COL1'
                   , col2    varchar2(30) path 'COL2'
           ) x
    ) src
    ON ( t.pk_id = src.pk_id )
    WHEN MATCHED THEN UPDATE
    SET t.seq_num = src.seq_num
       , t.col1 = src.col1
       , t.col2 = src.col2
    WHEN NOT MATCHED THEN INSERT
    (seq_num, pk_id, col1, col2, ...)
    VALUES (src.seq_num, src.pk_id, src.col1, src.col2, ...)
    ;

  • Inserted | updated | deleted | merged

    Hello,
    If a table has been set to update/insert and a row arrives with a matching column then the corresponding row in the target table is updated. In the job details window shouldnt it show a 1 under the updated section. My question really is, what does the merged tab indicate ?
    Thanks

    Hi,
    As per my knowledge
    If map runs in row based mode-- insert,update tabs are filled
    If map runs in set based mode- merge will come
    Row Based mode: In the pl/sql pkg generated by the map
    insert and update operation will happen for each row
    For insert/update option --First insert statement will run if the record exists then exception will come , then in the exception block update statment will be there and thee the record will be udpated..
    For update/insert option -- First it tries to update the record.. if it doestnt find the record it raises an exception , in the exception block insert statment will be ther
    that will insert the record..
    In Set based Mode:
    Instead of separate insert/update statements one merge stament will be there it will run...
    So set based mode is faster than row based mode..
    If any errors comes, then its difficult to find the source record causing the error in set based mode as it is in merge statment
    but it is easy in row based as it will do insert/update for each record --- each record will be inserted in the audit tables.
    Hope this will give u an idea
    Than you

  • Cannot perform insert/update on tabular form, because of dynamic action

    Hello all,
    I have created dynamic action which computes value from several tabular form cells.
    This functionality works nice, when I change value in associated cell then the computed value is changed by the dynamic action.
    But I am not able to insert or update the row in tabular form when the dynamic action is enabled. When I set condition to "Never", then the row is inserted or updated without any problems.
    Any guess where is the problem?
    Apex version: 4.1.1.00.23
    Jiri

    Ok, below are details related to my DA. Sorry for the poor description in previous posts.
    Triggered by: Chnage event
    Selection type: jQuery Selector
    jQuery Selector
    td[headers='SPECIESCODE'] input,td[headers='MEASURETYPE'] input,td[headers='TRUNKLOGID'] input,td[headers='LOGCLASS'] input,td[headers='LENGTH'] input,td[headers='PIECES'] input,td[headers='DIAMETER'] inputTrue Actions:
    *1.*
    //get element id which was changed by user
    var v_elementid = (jQuery(this.triggeringElement).attr('id'));
    switch(v_elementid.substr(0,3))
      case "f05":
       //assign value from triggered element to hidden field     
       $s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).val());   
       //assign actual values also to other hidden elements     
       $s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
       $s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
       $s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val()); 
       $s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val()); 
       $s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val()); 
       $s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val()); 
       break;
      case "f06":
       $s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).val());
       //assign actual values also to other hidden elements     
       $s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
       $s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
       $s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val()); 
       $s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val()); 
       $s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val()); 
       $s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val());      
       break;
      case "f07":
       $s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).val());
       //assign actual values also to other hidden elements     
       $s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
       $s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
       $s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val()); 
       $s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val()); 
       $s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val()); 
       $s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val());
       break;
    }*2.*
    //get element id which was changed by user
    var v_elementid = (jQuery(this.triggeringElement).attr('id'));
    switch(v_elementid.substr(0,3))
      case "f09":
       $s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).val());
       //assign actual values also to other hidden elements     
       $s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
       $s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
       $s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
       $s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val()); 
       $s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val()); 
       $s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val());      
       break;
      case "f12":
       $s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).val());
       //assign actual values also to other hidden elements     
       $s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
       $s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
       $s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
       $s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val());
       $s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val()); 
       $s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val());
       break;
      case "f13":
       $s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).val());
       //assign actual values also to other hidden elements     
       $s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
       $s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
       $s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
       $s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val()); 
       $s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val());
       $s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val());  
       break;
      case "f14":
       $s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).val());
       //assign actual values also to other hidden elements     
       $s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
       $s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
       $s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
       $s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val()); 
       $s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val()); 
       $s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val());
       break;
    }*3.*
    call PL/SQL function (values from hidden fields are used as input params)
    begin
    :P210_HIDDEN_VOLUME :=  function(:P210_HIDDEN_SPECIES,:P210_HIDDEN_MEASURE,:P210_HIDDEN_TRUNKLOGID,:P210_HIDDEN_LOGCLASS,:P210_HIDDEN_LENGTH,:P210_HIDDEN_DIAMETER,:P210_HIDDEN_PIECES, :G_USERLANG);
    end;*4.*
    here I want to set computed value from hidden field to VOLUME cell in tabular form. And it seems there is some problem, because not only the corresponding VOLUME cell is changed, but also several other cells. I realized that also several cells which are hidden to user has same value as computed VOLUME field. Including ROWID and then the insert/update operations are not done.
    // find the VOLUME-Field and set it to the computed value
    jQuery(this.triggeringElement).parents("tr:first").find("td[headers='VOLUME'] input").val($v("P210_HIDDEN_VOLUME"));I hope I have provide more information and somebody will be able to he help me. maybe the problem is clear, but with my poor jQuery knowledge i am not able to find it.
    Thanks in advance!
    -Jiri
    Edited by: Jiri N. on Aug 10, 2012 3:24 AM

  • How can perform insert /update /delete in one single mapping.

    Hi,
    I want to is there any logic by which we can create 2-3 pipeline in a mappings like pipelines will work for insert / update /delete or storing soem rejected data according to conditional flag.
    I tried it in a mapping but problem is that when target load order is like ins then upd then delete/reject . if new rec will come then control will pass through ins target . but if rec needs to update or delete then again control is going to ins target not update / delete target.
    We have already given the all conditional flags in filter after lookup and before target .
    all possibilities we checked but didnt got success.
    last option is separate the mappings for insert / update/delete.....etc.
    Is there any solution for this type of problem.
    reply plz if any body have solutions.
    ---Umesh

    Hi Umesh,
    I understand from your query that you want to load target with insert, update and delete rows after runnng the mappping...
    If you are looking for the same then you can use one of the Oracle fetures Oracle Streams: Change Data Capture.
    the Url is:
    http://www.oracle.com/technology/products/bi/db/10g/pdf/twp_cdc_cookbook_0206.pdf
    If any other help required do reply.
    Regards
    Tarang Jain

  • Insert, update and delete trigger over multiple Database Links

    Hello guys,
    first of all I'll explain my environment.
    I've got a Master DB and n Slave Databases. Insert, update and delete is only possible on the master DB (in my opinion this was the best way to avoid Data-inconsistencies due to locking problems) and should be passed to slave databases with a trigger. All Slave Databases are attached with DBLinks. And, additional to this things, I'd like to create a job that merges the Master DB into all Slave DB's every x minutes to restore consistency if any Error (eg Network crash) occurs.
    What I want to do now, is to iterate over all DB-Links in my trigger, and issue the insert/update/delete for all attached databases.
    This is possible with the command "execute immediate", but requires me to create textual strings with textually coded field values for the above mentioned commands.
    What I would like to know now, is, if there are any better ways to provide these functions. Important to me is, that all DB-Links are read dynamically from a table and that I don't have to do unnecessary string generations, and maybe affect the performance.
    I'm thankful for every Idea.
    Thank you in advance,
    best regards
    Christoph

    Well, I've been using mysql for a long time, yes, but I thought that this approach would be the best for my requirements.
    Materialized View's don't work for me, because I need real-time updates of the Slaves.
    So, sorry for asking that general, but what would be the best technology for the following problem:
    I've got n globally spread Systems. Each of it can update records in the Database. The easies way would be to provide one central DB, but that doesn't work for me, because when the WAN Connection fails, the System isn't available any longer. So I need to provide core information locally at every System (connected via LAN).
    Very important to me is, that Data remain consistent. That means, that it must not be that 2 systems update the same record on 2 different databases at the same time.
    I hope you understand what I'd need.
    Thank you very much for all your replies.
    best regards
    Christoph
    PS: I forgot to mention that the Databases won't be very large, just about 20k records, and about 10 queriees per second during peak times and there's just the need to sync 1 Table.
    Edited by: 907142 on 10.01.2012 23:14

  • Oracle Merge vs Informatica Update Strategy

    How do you guys compare the two? Consider we have a large data set. About 5-10 million rows in the table and upto 1 million rows daily as insert/update. How does the performance vary if we only 10,000 rows daily as insert/update?
    Any inputs are appreciated. We currently have Oracle 9i and are soon upgrading to 10g. Has the merge feature has any improvements in 10g.
    thanks

    I'm attacking the idea that concepts and principles of an application layer system (like Informatica) should be enforced onto Oracle, or is even at all relevant to Oracle.
    The core of an Information System is what? The application? Applications come and go. Here today. Legacy tomorrow. Replaced next year.
    Ask any business user what is important - the spreadsheet application or the spreadsheet's data? Data is forever. The database is the core of the Information System.
    So it does not matter what Informatica may think is a bright idea or brilliant concept. The fact is that all RDBMS products are not equal. E.g. what works for Oracle does not work for SQL-Server. And vice versa. The on-shoe-fit-all approach from the application tier is flawed. Informatica's concurrency controls may work well with Ingres or SQL-Server - but that does not say it will work well at all with Oracle. (and likely not in such a case as Oracle's concurrency controls are very different)
    To ensure that the core does not rot, one need to ensure that the core is design correctly. So when it comes to something like Oracle and Informatica (or J2EE or .NET or CORBA or whatever) - so what? Do it right in the RDBMS first and foremost. (and this is as relevant for SQL-Server/Ingres/Informix/etc as for Oracle)
    As for how does Informatica and Oracle compare? Not relevant. The former is not the leading and most advance RDBMS product in the world. Oracle is.

  • Load Type as INSERT/UPDATE ?

    Hi,
    I would like to use load type INSERT/UPDATE. So would it create any performance issue when compareted to the load type as INSERT. Is it considerable?
    Thank you,
    Regards,
    Gowtham Sen.

    Hi
    That depends completely on the data you are reading in (your source) and how often the row exists in the target table. The idea to choose between INSERT/UPDATE and UPDATE/INSERT is if you know that most of the data is new you choose the first one but if most of the data already exists you choose the latter. But the code generated in the end will be a MERGE statement so it won't matter much.
    To make sure you get the best performance in case your ETL will have to to many updates as well as inserts is to make sure that the matching criteria on the target is indexed.
    Borkur

  • (Automatic) Refresh of Cached object after insert/update

    Hi,
    (I am using Toplink 9.0.3 against an Oracle Database)
    I am inserting and updating records in the database through objects registered in a TopLink UnitOfWork. I happen to know that certain database columns will get a (changed) values because of Database triggers.
    Is it true that the only way to get these changed values reflected back to the TopLink cache is by explicitly executing a
    session.refreshObject();
    call for every object changed in the UnitOfWork?
    Is there no way to inform TopLink (for example through the descriptors for the relevant classes) that for certain classes after the insert/update an automatic synchronization with the database must be performed?
    I have not been able to find such a setting, but I may have overlooked it - I hope I did.
    Thanks for your help,
    Lucas Jellema (AMIS)

    In this case use a postMerge event -- it will get called after the merge of the cache and then you could update the object explicitly.
    Ultimately, the way to achieve the behavior you're looking for is events or refreshing.
    - Don

Maybe you are looking for

  • Error to start the Admin Server of WebLogic

    Hi to everybody: I have a problem when I running the Admin Server of WebLogic, this is the message: ** Setting up SOA specific environment for win... PATH=C:\Oracle\MIDDLE~1\HOME_1~1\patch_wls1033\profiles\default\native;C:\Oracle\MIDDLE~1\HOME_1~1\p

  • Ovi Map, Check in feature.

    I´m just wondering if its my phone, my ovi maps or what. The apps Check in, in Ovi Maps does only show up ones and a while. Its so cool apps, that I would love to use it more. Regards.

  • Visual Studio UI not refreshing

    Hello, I have downloaded webinstaller of Microsoft Visual Studio Ultimate 2013 32-bit (English) from dreamspark and installed it. However, after installation the UI of Visual Studio was not refreshing properly. I had gray background, moving mouse ove

  • Variable text

    I am creating a flyer my client would like to personalize the flyer to each person that the flyer is sent to. It should read (persons name) how would you like to save 40% see detail inside. I need to know how to create a variable text box that would

  • Listing and closing open TCP ports

    Hi, For security reasons I would like to have as few open TCP ports as possible on my iMac, leaving open only those that I feel are worthwhile having enabled. How can I go about to a) identify which TCP ports are currently open on the system b) ident