How To Perform Parallel UPDATE When Trigger is ENABLE On Table.

select *from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE    11.1.0.7.0      Production
TNS for Linux: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - ProductionIs there any way to perform PARALLEL UPATE on a table which has a trigger?
One of my ETL performs a large UPDATE (14 Million update) everyday on a production hot table. Eventhough PDML is enable at session level (also TABLE.DEGREE=8), Oracle is doing serialized UPDATE.
As per Oracle documents, it is documented behavior.
Here is my Execution plan when i put the trigger ENABLE
| Id  | Operation              | Name                | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |    TQ  |IN-OUT| PQ Distrib |
|   0 | UPDATE STATEMENT       |                     |       |       |  6443 (100)|          |       |       |        |      |            |
|   1 |  UPDATE                | ACCOUNT             |       |       |            |          |       |       |        |      |            |
|*  2 |   PX COORDINATOR       |                     |       |       |            |          |       |       |        |      |            |
|   3 |    PX SEND QC (RANDOM) | :TQ10000            | 72487 |  3610K|  6443   (3)| 00:01:18 |       |       |  Q1,00 | P->S | QC (RAND)  |
|*  4 |     FILTER             |                     |       |       |            |          |       |       |  Q1,00 | PCWC |            |
|   5 |      PX BLOCK ITERATOR |                     | 72487 |  3610K|  6443   (3)| 00:01:18 |   KEY |   KEY |  Q1,00 | PCWC |            |
|*  6 |       TABLE ACCESS FULL| ACCOUNT             | 72487 |  3610K|  6443   (3)| 00:01:18 |   KEY |   KEY |  Q1,00 | PCWP |            |
Predicate Information (identified by operation id):
     8 - filter("SET_OF_BOOKS"='1' AND "GL_BATCH_ID">(-10) AND ("JOURNAL_ENTRY_TYPE_ID"<2400 OR
              "JOURNAL_ENTRY_TYPE_ID">=3000) AND "ACCOUNTING_DATE">=TO_DATE(' 2010-08-11 00:00:00', 'syyyy-mm-dd
              hh24:mi:ss') AND "ACCOUNTING_DATE"<TO_DATE(' 2010-08-12 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))When i disable trigger
| Id  | Operation                | Name     | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
|   0 | UPDATE STATEMENT         |          |   726 | 27588 | 11899   (2)| 00:02:23 |        |      |            |
|   1 |  PX COORDINATOR          |          |       |       |            |          |        |      |            |
|   2 |   PX SEND QC (RANDOM)    | :TQ10001 |   726 | 27588 | 11899   (2)| 00:02:23 |  Q1,01 | P->S | QC (RAND)  |
|   3 |    INDEX MAINTENANCE     | ACCOUNT  |       |       |            |          |  Q1,01 | PCWP |            |
|   4 |     PX RECEIVE           |          |   726 | 27588 | 11899   (2)| 00:02:23 |  Q1,01 | PCWP |            |
|   5 |      PX SEND RANGE       | :TQ10000 |   726 | 27588 | 11899   (2)| 00:02:23 |  Q1,00 | P->P | RANGE      |
|   6 |       UPDATE             | ACCOUNT  |       |       |            |          |  Q1,00 | PCWP |            |
|   7 |        PX BLOCK ITERATOR |          |   726 | 27588 | 11899   (2)| 00:02:23 |  Q1,00 | PCWC |            |
|*  8 |         TABLE ACCESS FULL| ACCOUNT  |   726 | 27588 | 11899   (2)| 00:02:23 |  Q1,00 | PCWP |            |
Predicate Information (identified by operation id):
   8 - filter("SET_OF_BOOKS"='1' AND "GL_BATCH_ID">(-10) AND ("JOURNAL_ENTRY_TYPE_ID"<2400 OR
              "JOURNAL_ENTRY_TYPE_ID">=3000) AND "ACCOUNTING_DATE">=TO_DATE(' 2010-08-11 00:00:00', 'syyyy-mm-dd
              hh24:mi:ss') AND "ACCOUNTING_DATE"<TO_DATE(' 2010-08-12 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))I cannot disable trigger due to some business reasons.
Is there any way to speed up UPDATE ?

No, you cannot perform parallel dml with a trigger present.
If you are updating the bulk of the rows and can take an outage, you can
disable the trigger, perform the update, enable the trigger
OR
copy to another table, performing the update in the select, rename the tables and add the trigger on the new table
Hemant K Chitale

Similar Messages

  • How to perform auto update in staging database using warehouse builder ?

    Hi ,
    here our client requirement is?
    our client want to transfer data from their production database to staging database using warehouse builder.and also what ever the update occur in production database
    that must be reflected in staging database.
    here we are transfering data from product-db to staging using etl(maping--insert/update operator )
    it is transfering fine.but it is not automaticaly updating in staging db with new update in production database?
    can any body give me the details how to achive it.
    Thanks & regards,
    k azamtulla khan.

    Hi,
    firstly there are two threads for the same issue from youself(excluding this one) which is a waste of others time so kindly refrain from doing so and use one thread.
    OWB: how can automatic updation  perform in staging database using OWB
    OWB: how to use insert/update table operator for target table
    secondly, with regards to the options , here are some options:
    1. Use trigger for update.
    2. Use materialized view(refresh on commit)
    3. Use oracle advance queing mechanism (OAQ) for queing the recent inserted/updated records.
    Kindly close other threads and maintain just one thread.
    Regards
    Message was edited by: Rado
    user647181

  • Dynpro application: how to perform some  code when user click window close

    Hello,
    I'm developing dynpro application. This application needs to perform some code when exiting.
    I can do that with MODULE xxxxx AT EXIT-COMMAND. But this code can't be performed when user of application click on button closing window (classic R/3 window, not pop-up).
    Does anybody know how to bind some code to clicking on button closing window?
    Best regards,
    Josef Motl

    As far as the prompt that you get when you close the last window is coming from the counter that SAP maintains regarding the number of open sessions(windows). When this counter reaches 1, I guess they have a check to issue a prompt. There was a discussion in this forum a long time back regarding how we can know that session id like SM04. There was no conclusion reached then. Theoritically, let us know you know this id for the session in which the user opened a particular page, then you can see if that session is deleted and then take the necessary action. There are some TH_* function modules that seem to be promising, but I was not able to conclusively achieve the control over a particular session.
    See if you can look at SM04 and get an idea. Please do let us know if you find the solution.
    Srinivas

  • How to avoid ModelLayer Update when validation fails in ValueChangeListener

    Hi,
    One of the requirement in my application is to avoid model layer update when a value is changed in a field and it is not a valid value according to business functionality. Scenario is explained below.
    1. Screen has one field SSN no.
    2. User enters 889787873 (According to functionality, SSN no. should not start with 8 or 9)
    3. The moment user enters and does Tab out, Value change listener gets fired (AutoSubmit is set to true and value change listener is mapped to it)
    4. I have a util method isValidSSN(int ssnNo) that gets the SSN no as input argument, validates it, returns true if it is valid otherwise false.
    There can be many ways to achieve the above said functiontlity including the best way of keeping the validation at entity attribute level. But that is not what i am looking for. I am doing migration of desktop application and want to mimic the code as how as it is (According to client requirement).
    Requirement behavior:
    In value change listener, I should get the newly entered value (Not from ValueChangeEvent.getNewValue()), validate it. If it is valid, I should update the model. If not, I should not do model layer update call at all as i want to keep my transaction undirty, but show invalid SSN message to the user.
    Requirement:
    1. Get the new value inside valueChange listener. I don't want to use valueChangeEvent.getNewValue() because what i said as SSN is just an example but in our app, we use many data types including custom domain data types. So i cannot expect valuechangeEvent.getNewValue() always gives me the new value with proper data type. I also know i cannot use UiComponent.processUpdate(facesContext) to get the new value from VO attribute. Because calling processUpdate issues setAttribute call at model layer, which in turn makes the transaction dirty. So i need to access the newly entered value with proper data type in some other way.
    2. If any itemChange logic fails, I should not update the model layer but directly comes to render response. I hope this is doable by calling FacesContext.renderResponse() API but need confirmation or any other way if i am wrong.
    Thanks in Advance.
    Raghu

    Thanks to all for your responses. Regarding accessing of new value inside value change listener, I am sure ValueChangeEvent.getNewValue() is not going to give me the value with proper data type. I am not using immediate attribute anywhere but use custom domain data type with masking (i.e. Formatter Format). Also I use InputDate field. Always valueChangeEvent.getNewValue() gives me the string representation of the value but not with actual data type.
    Question:
    1. Is there any API, that gets the valueChangeEvent.getNewValue() and the UI components as parameters and return the data with proper data type?
    2. I need to get the newly value with proper data type inside valueChangeListener. Is it achievable? If so, how?
    Need your help.

  • 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

  • How to delete or Update the data in the MEAN table

    Hello Gurus,
    I would like to delete or update the data in the MEAN table...how to do it.
    Precisely I would like to change the status of Main EAN Indicator (field HPEAN).
    Kindly let me know ??
    Rehards
    Senthilll

    programmatically, you may use [BAPI_MATERIAL_SAVEDATA|https://www.sdn.sap.com/irj/scn/advancedsearch?query=bapi_material_savedata&cat=sdn_all] [EAN|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&query=bapi_material_savedata+ean&adv=false&sortby=cm_rnd_rankvalue]
    Regards,
    Raymond

  • How to performance an UPDATE query in EJB project

    Hi all,
    I would appreciate help very much in knowing how to update rows in database when using EJB projects. Select queries are widely explained but nothing about update ones.
    Thanks in advance.

    869357 wrote:
    No it's not running, giving some error.That is because SQL server construct is different than that of Oracle.
    Try with
    update table1 a set a.id = (select min(b.id) from table2 b where a.dept = b.dept);
    However, due the repeated department values will not give you the desired output.

  • How does one do updates when your service provider is s-l-o-w??                     According to the counter, our computer needs almost 20 hrs. of updates, is there a way to pick and choose which ones are downloaded?

    We have a "Rocket Hub" and our download times vary greatly.  My husband's computer, Snow Leopard OS, shows he has about 20 hrs. of updates to download.  Is there a way to pick and choose so we can catch up?

    Nope, because files sizes, machines, software installed are different and you can't control what needs to be installed first before others work.
    Apple is all Internet, you should see Lion users, they can't reinstall their OS at all without a Internet connection. (or pay $69 for the Lion USB key) and then there still the updates to deal with.
    So take a ride, to a Apple Store early in the morning before their network gets overloaded (what a way to get you in the door and buy more junk uh?) fully update to 10.6.8.
    Good thing about Snow Leopard, not much more in large updates coming for that verision, in fact they will stop completely come next spring or so when 10.8 is released.
    Unless you live in a wealthy area with broadband, your a nobody in Apple's viewpoint.
    You could get a 3G laptop connect card, hopefully that will give you enough to download your updates but they cost a fortune.
    If I could just provide you with update disk I would, but I can't, machines are different.
    Call Apple and ask for a update disk, perhaps they have a solution
    Once you do get all your updates, Carbon Copy Clone your boot drive to a external drive, it's hold the option key bootable duplicate.
    Donationware too.
    http://www.bombich.com/index.html

  • 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

  • How to remove an update when there is no option to cancel it?

    iMac on Yosemite 10.10 here, but under purchases on the App Store, it shows OS X Mavericks download is paused and the only option is to resume download. Since I am already on Yosemite, how do I cancel/stop this update completely, instead of just pausing it?
    I see an update under launchpad on the dock, but that is just the old OS update. It's rather annoying to keep looking at and am hoping to delete it or cancel it fully.

    You might want to make a bootable USB in case you want to revert.
    Bootable USB Flash Drive – Diskmaker X

  • How do you handle update and delete rules for fact tables?

    I have a fact table with a composite key of 5 columns. Two of the columns are FKs to the date dimension. I was setting the delete/update rules for the FK relationship in SSMS and it had a problem with me creating cascade action on the FKs that connected
    to the date dimension.
    What is the proper way to set up FK relationships in fact tables with SSMS when  you have composite keys as most fact tables do?

    Yeah I understand all that. What I'm trying to do is to protect my database from RI violations that occur by production support people blowing away stuff in a dimension table but forgetting to blow away related records in the fact table. I want those fact
    records deleted automatically so we don't have orphan records which was a real issue at a previous engagement. Production support is usually just people that know SQL and some relational modeling. It's not too likely they will understand the details of dimensional
    modeling enough such that they would know that they had to blow away the fact record first.
    My problem is I have a FK to a role playing dimension (the date dimension in this case). So basically I have to columns in the fact table that have a FK relationship to the PK of the date dimension. When I create both relationships SSMS and try to have both
    of them cascade delete SSMS has an issue with it.
    The error I get is:
    Unable to create relationship '[relationship name]'
    Introducing Foreign Key constraint '[constraint name]' on table '[table name]' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other foreign key constraints.
    I can go ahead and put no action and the table will save fine. The question now becomes how does the cascade delete actually work. Can I just set one part of the key to cascade delete?
    Actually I just realized that this is an even bigger design issue. What DOES happen to a fact record when one of it's dimensions gets deleted and I've got full RI set up on the table?
    Or am I totally thinking about this wrong. Do you set up cascade deletes in a dimensional model? Is there a way to prevent deletes from the dimension table if there are related fact records?

  • How to right an update query in oracle using two tables?

    Table1
    ID     Dept
    1     A
    2     B
    3     A
    4     B
    5     C
    6     A
    7     D
    Table2
    ID     Dept
    1     A
    2     B
    3     A
    4     B
    5     C
    6     A
    7     D
    How to update id in Table1 from Table2 on joining condition Table1.dept=Table2.dept
    in Oracle

    869357 wrote:
    No it's not running, giving some error.That is because SQL server construct is different than that of Oracle.
    Try with
    update table1 a set a.id = (select min(b.id) from table2 b where a.dept = b.dept);
    However, due the repeated department values will not give you the desired output.

  • How add title to checkbox when select multiselect in htmlb table

    I am doing htmlb using Java and can't seem to be able to add a title to the checkbox on my table.
    I see how to get the columns in java by using the following code
    TableColumn columnA = model.getColumnAt(2);
    But I can't seem to access the column that htmlb creates for the checkbox to add a title.  I was hoping to add Delete above the box so when they selected it, boom deletes
    Does anyone know how to do this?
    I award points for good answers
    Cheers,
    Devlin

    I am doing htmlb using Java and can't seem to be able to add a title to the checkbox on my table.
    I see how to get the columns in java by using the following code
    TableColumn columnA = model.getColumnAt(2);
    But I can't seem to access the column that htmlb creates for the checkbox to add a title.  I was hoping to add Delete above the box so when they selected it, boom deletes
    Does anyone know how to do this?
    I award points for good answers
    Cheers,
    Devlin

  • How to connect via eithernet when airport is enabled

    I have iBooks that are set to automatically connect via airport. When I want to run updates on these iBooks, I would prefer to plug an ethernet cable into them and then run my updates via ethernet. Do I have to first login to the machines and turn off airport in order to force ARD to connect via ethernet? Currently, I have connected them to ethernet and restarted, but in the list they show up with their static IP address that is assigned to their airport card. Any guidance would be appreciated.
    -Ryan

    In the network control panel, you can put the network connections in the order in which you want to use them. Can't you achieve your goal by ensuring the ethernet connection is listed above the others?

  • How to perform row level changes in a region of table type

    Hi Gurus,
    I am having a region of type table. In this table I have added a details section. In the details section I want to display an item only when its not null. So I have changed the code in controller to make the render as false for this field when it is null. But this is applied to the item present in all the rows in the table.
    For example: If there are two rows in the table and first has some value in X item while second has null value for the same item. Then both the rows do not show the item X (render is set as false by controller).
    Is there any way to have the item visible in first row and invisible in second row?
    Thanks,
    Manish

    You have to go for SPEL binding. Create a transient attribute in the same VO of the table and set the value of the each row to true or false depending on the value of the attribute of the first, say using decode statement ( DECODE(firstattr, null, false, true)) and then bind this attribute to the RENDERED_ATTR attribute of the second item using SPEL binding. Please refer Dynamic User Interface section of the Chapter 4 of OA Framework Dev. Guide.
    Regards,
    Guru.

Maybe you are looking for