Skip to Content
0
May 28, 2020 at 07:45 AM

Best practice in table fields update (big table)

551 Views Last edit May 28, 2020 at 07:55 AM 3 rev

Hi everybody,

I'm wondering which best practice shall be adopted in the following scenario:

  • ECC 6.0 (SAP_ABA 700)
  • Oracle 12.1.0.2.0
  • Z table with 53 fields, 3 fields as primary key (plus 1 for MANDT), total fields length 831 Bytes
    the table contains more than 13 mil records;
    out of them, about 350 k shall have two fields that need to be changed (with different values per record)

While looping through the records finding those to change, and calculating the two fields new values to modify, shall I go with UPDATE... SET... WHERE?

Or, shall I collect the records and do an UPDATE... FROM TABLE...? (in such a case, how many records shall I process? one shot?)

When to do a Commit Work?

Any suggestion on this is highly appreciated!

Thank you and Kind regards,

JFlanderds