Bulk update of 25 Million rows
792848Dec 3 2010 — edited Dec 3 2010Hi All,
I have two tables table_A and table_B, I need to update three column in the table_A ie (ia_id,b_id_c_id) from table_b and i need to update all the 25Million rows in the table_a from table_b.I though of using an update statement as follows
UPDATE TABLE_A
SET (a_id, b_id, c_id) =
(SELECT TABLE_B.a_id, TABLE_B.b_id,
TABLE_B.c_id
FROM TABLE_B
WHERE TABLE_B.employee_id = TABLE_A.employee_id)
WHERE EXISTS
(SELECT TABLE_B.a_id, TABLE_B.b_id,
TABLE_B.c_id
FROM TABLE_B
WHERE TABLE_B.EMPLOYEE_ID = TABLE_A.EMPLOYEE_ID)
FYI-------
I have dataguard environment with physical standby
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
Can you please suggest me the best way to update this many rows.
Thanks