How to do a mass UPDATE on a table that must be kept "online"

Hello,
I am using Oracle 10g and would like to know how best to update a very large table (20 million rows) globally (one column in all rows) in such a way as to make the UPDATE as fast as possible and avoiding contention on indices, row locks etc.
The table has no Foreign Keys, No triggers. I have read about creating temporary tables, filling them, dropping the original and then renaming, but this does not seem reasonable considering that the table must be at all times online.
I have also tried with a parallel hint but it was slow.
Any insights greatly appreciated.

Is this identical to the question you asked Strategy for a fast global UPDATE on a large online table?? Or is there some difference between the two that I'm missing?
Justin

Similar Messages

  • How the consumption valuse gets updated in the table MVER

    Hi,
    Can anyone explain me how the consumption value gets updated in the table?
    Would you please be able to confirm that all movement types are considered for updates in table MVER. If not, i would need the movement types that are considered as pertaining to u2018consumptionu2019.
    Thanks
    Srini

    Hi,
    Consumption both in material master view and table MVER are updated as soon as the movement is made, ie, real time data.
    To see the movements relevant to consumption, use OMJJ to review movement types or table T156. In this table, select Consumpt.postg. field not equal to blank (so blank is excluded).
    This should then show all movement types subject to consumption posting. The likely ones to see are below, with majority being G.
    (blank)     No consumption update
    G     Planned withdrawal (total consumption)
    R     Planned, if ref. to reservation, otherwise unplanned
    U     Unplanned withdrawal (unplanned consumption)
    Thanks.

  • How do I select rows from the same table that have multiple occurances

    Hi Everybody,
    I am trying to select records from a detail table by grouping it. The table has more than 1 million records and the query is not performing well. The basic question is how to select a distinct record from a table which matches all values in one column and any in the other.
    desc SCV
    ID NUMBER PK (ID + SCRID)
    SCRID NUMBER FK(SC)
    ID SCRID
    1 1
    2 1
    3 1
    4 2
    5 2
    6 3
    7 4
    8 4
    desc PROJECTS
    ID NUMBER PK
    NAME VARCHAR2(100)
    ID NAME
    1 PROJECT1
    2 PROJECT2
    3 PROJECT3
    4 PROJECT4
    desc PJS
    ID NUMBER
    PROID NUMBER FK (PROJECTS)
    SCRID NUMBER FK (SCV(SCRID + SCVID)
    SCVID NUMBER
    ID PROID SCRID SCVID
    1 1 1 1
    2 1 1 2
    3 1 2 5
    4 1 3 6
    5 1 4 7
    6 2 1 3
    7 2 2 4
    8 2 2 5
    9 2 4 7
    There are over 1 million records in PJS.
    desc TBP
    SCRID NUMBER
    SCVID NUMBER
    SCRID SCVID
    1 1
    1 2
    1 3
    2 4
    2 5
    3 6
    4 7
    4 8
    The requirement is to select projects that have matching SCRID, SCVID from TBP such that
    all distinct SCRID should match and within that and any SCVID match will do. (A "AND" between each SCRID and an "OR" for each SCVID in that SCRID like 'SCRID = 1 AND (SCVID = 1 OR SCVID = 2 OR SCVID = 3) AND SCRID = 2 AND (SCVID =....)
    So, for the sample data it should return us PROID = 1
    I have few queries written for this:
    SELECT PROID FROM PJS,TBP WHERE TBP.SCVID = PJS.SCVID AND TBP.SCRID = 1
    INTERSECT
    SELECT PROID FROM PJS,TBP WHERE TBP.SCVID = PJS.SCVID AND TBP.SCRID = 2
    INTERSECT
    SELECT PROID FROM PJS,TBP WHERE TBP.SCVID = PJS.SCVID AND TBP.SCRID = 3
    INTERSECT
    SELECT PROID FROM PJS,TBP WHERE TBP.SCVID = PJS.SCVID AND TBP.SCRID = 4
    This query performs well but the cost is very high, hardcoding, sorting.
    The 2nd option is to:
    SELECT pjs.PROID proid
    FROM TBP tbp,
    PJS pjs
    WHERE pjs.SCVID = tbp.SCVID
    AND pjs.SCRID = tbp.SCRID
    GROUP BY pjs.PROID
    HAVING COUNT(DISTINCT pjs.SCRID) = (SELECT COUNT(DISTINCT SCRID ) FROM TBP)
    This has a low cost but runs slowly.
    One more way I tried was with the IN operator like
    SELECT DISTINCT PROID FROM PJS A,TBP T WHERE T.SCRID = 1 AND T.SCVID = A.SCVID
    AND PROID IN (SELECT PROID FROM PJS A,TBP T WHERE T.SCRID = 2 AND T.SCVID = A.SCVID
    AND PROID IN (...SO ON with each DISTINCT SCRID.
    Again this involves too much of sorting.
    Any help will be appriciated.
    Thanks in advance.

    Hi Andrew,
    Use DELETE t_itab statement inside the loop.
    I have modified your code. It is perfectly working.See bellow  -
    LOOP AT it_zmember01 INTO wa_zmember01.
    WRITE: / wa_zmember01-mnumber UNDER 'NUMBER',
    wa_zmember01-mname UNDER 'NAME',
    wa_zmember01-mdob UNDER 'DOB'.
    WRITE / '-----------------------------------------------------------------'.
    DELETE it_zmember01.               " Modified
    ENDLOOP.
    DELETE it_zmember01. statement inside the loop will delete the current row of the table.
    Regards
    Pinaki

  • How to perform a Mass update in Vendor master-- WHolding Tax TYPE

    I need to update the With holding tax type to be added to a list of vendors.
    Please suggest.
    I tried doing it by MASS/ XK99 but that I think is only for updating TAX code under a specific Tax type.
    I want to add new tax type in multiple vendors.
    Please post your sugestions ASAP.
    Regards,
    Madhur

    Hi Madhur,
    You can try LSMW for the same.
    Please refer the link on LSMW by RAVI SANKAR VENNA.
    LSMW for Functional Consultants in simple step-by-step way
    You can try FM FI_WT_VENDOR_UPDATE as well.
    Hope this helps you.
    Regards
    Eugene

  • How do I deleat an update for Garage Band that I don't want?

    I have received notification of an update for Garage Band, a program that I will never use. How do I deleat this notification of the update?

    1. Update it.
    2. Delete GB from your iMac.
    Personally I would just update it and move on.

  • How is the field ValStockValue updated in the table S032

    Hi,
    For a material ValStockValue (S032-WBWBEST) has a negative quantity.
    The concerned material has standard price control and there is unrestricted stock.
    Could you please let me know how is this field calculated.
    Regards
    Deepak

    have a look into OSS Note 195158 - Copy S032 is updated incorrectly

  • HT5784 How do i install this update because it says that my software is up to date (and obviously it isn't)

    help me

    With a few exceptions, Software Update usually does the right thing here.
    Please confirm which patch you are looking at; is it the one referenced by HT5784?  (The titles around here sometimes change, and references to various updates do get added to posts.  That HT5784 is for 10.8.4, though your footer indicates a 10.7.5 version, too.)  I think the phrasing of that article is a little confusing; if I read that correctly, 10.8.4 includes the cited security update.   That security update was available separately for previous OS X versions.
    Here's the download link for the Mountain Lion Security Update 2013-003, which looks to be the latest available update.  Software Update should have already offered that installation.
    For other patches and other versions (and again, I'd expect Software Update to do the right thing here, for most cases), here are the downloads for OS X and here is a write-up on the various security updates (HT1222).

  • How Can i get the data From A Table that use DefaultTableModel

    Hi and sorry for my bad english. The problem that i have is that i used this code to fill a table. Now i want when i select a row and click in a button , get the value of that row that i select so then i can update or delete that data in my dataBasesServer.
    private void consulta(){
              Connection c = ConectarSQL.conexionSQL();
              try {
                   Statement s = c.createStatement();
                   ResultSet ar = s.executeQuery("Select Apellido, Nombre FROM Personas");
                   DefaultTableModel modelo = new DefaultTableModel();
                   this.Tabla.setModel(modelo);
                   modelo.addColumn("Apellido");
                   modelo.addColumn("Nombre");
                   while (ar.next()) {
                      Object [] fila = new Object[2];
                      for (int i=0;i<2;i++)
                         fila[i] = ar.getObject(i+1);
                      modelo.addRow(fila);
              } catch (SQLException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    }

    Dont worry kevinaworkman, the thing is that a read it and is really usefull, but i was looking other kind of solution. But i welcome your answer and interested to solve my problem.
    I find the answer.
    To retrive the data i have to use the following instruction:
    Tabla.getValueAt(Tabla.getSelectedColumn(),Tabla.getSelectedRow);

  • How to add one button at top of table that creates new rows each time a user clicks on it?

    In the help guide, there is an example of adding buttons to each row - an Add Row and Delete Row button.  I am interested in having one button at the top of the table that can add rows. 

    Hi,
    You can create a table with a header row, where you can place your add button in one of its cells.
    Then you need a script to create a new row in the buttons click event. In a table named 'Table1' with a row named 'Row1' it looks this way:
    Table1._Row1.addInstance()

  • Mass update of email in the vendor master record

    Hello to you all,
    Does anyone know how can I run mass update of email in the vendor master record for a big No. of entities?
    XK99 won't help since you can't find the email,
    Batch input recording won't help as well since the email can't be found.
    I will appreciate your help,
    Amir

    Hello Amir,
    You can use LSMW for update operation. You should create a batch input recording for transaction FK02. But you must tick "Use central address management" checkbox on FK02 screen while recording batch input. After that you will see E-mail field on screen.
    Regards,
    Burak

  • Mass Update of date in Qualified  table

    I having problem in updating End availability date in Partner Specific Data (which is a qualified table). How can do a mass update of selected records. I have written an assignment expression which has no error but it is not doing the update.
    Regards,
    Marcel

    Hi Marcel
    Assignment and validation does not work well for qualified table. It will work for only first qualified linked record and not all.
    for mass update you can use import manager map the date qualifier field and select replcae action for qualified update in the destination item.
    best regards
    ravi

  • Mass updating supplying site - WRF3

    Dear Retail Gurus,
    I have a requirement to do mass update of WRF3 table (reference is T.Code WB30, we are using the transaction to update MC/Site in WRF6 table). Like this do we can any transaction code to update WRF3? Can any one advise me on the transaction code to update WRF3?
    Thanks in advance.

    Hi Paul Gendreau,
    Thanks for your reply.
    as I explained earlier our requirement is that End user/Business user need to do mass create/update Merchandise caterogy & Price list to Site in WB30. Currently user can not create/update Merchandise caterogy & Price list to Site in WB30, and can not use filter/search for site in WB30. Do we have any separate SAP standard transaction code for the functionality?

  • Consumption values get updated in the table MVER

    Hi,
    Can anyone explain me how the consumption values get updated in the table MVER?
    If you have any doucments,it will be better......
    Thanks
    Srini

    hi,
    When ever you do the GR for the consumption postings, the material gets updated in the respective table...
    You can see the table in SE16 tcode...
    There is ABAP coding linkages, in which all the fields are stored in the forms of tables in the std sap system...
    Hope it helps...
    Regards
    Priyanka.P
    I request you to close the threads once you get the satisfied answers...

  • How to recover the data from a  dropped table in production/archive mode

    How to recover the data/change on a table that was dropped by accident.
    The database is on archive mode.

    Oracle Version. ? If 10g.
    Try this Way
    SQL> create table taj as select * from all_objects where rownum <= 100;
    Table created.
    SQL> drop table taj ;
    Table dropped.
    SQL> show recyclebin
    ORIGINAL NAME    RECYCLEBIN NAME                OBJECT TYPE  DROP TIME
    TAJ              BIN$b3MmS7kYS9ClMvKm0bu8Vw==$0 TABLE        2006-09-10:16:02:58
    SQL> flashback table taj to before drop;
    Flashback complete.
    SQL> show recyclebin;
    SQL> desc taj;
    Name                                      Null?    Type
    OWNER                                              VARCHAR2(30)
    OBJECT_NAME                                        VARCHAR2(30)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_ID                                          NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(19)
    CREATED                                            DATE
    LAST_DDL_TIME                                      DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    SQL>M.S.Taj

  • How to find out the tables that will be affected using a transaction

    Hi,
    How to find out the list of database tables that will be affected when we use a standard transaction(ex. VA01, MM01..)...?(like When we create a salesorder, which tables and which fields will be affected..?)
    Is there any transaction or a simple way to find out the solution?
    Thanks,
    Pradeep.

    Hi,
    Give transaction code and in menu(system- status),  double click onthe Program name.
    Check in TOP INCLUDE - you will find all the tables related to that transaction.
    Thanks,
    Anitha

Maybe you are looking for