Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Best ways to copy 4 billion records from one table to another new table in Oracle 11g

User_IRY7QJan 29 2021 — edited Jan 29 2021

Hi there,
I need to copy AS-IS 1 TB data for all columns except EMAIL_ADDR that has 5 billion records from EMP_DTL table to another new empty EMP_DTL_NEW table. I already had a function that I can call to encrypt EMAIL_ADDR.
Table 1

EMP_DTL
(
EMP_ID VARCHAR2(10),
BDG_ID VARCHAR2(10),
EMAIL_ADDR VARCHAR2(56),
EMAIL_CD VARCHAR2(8),
EMAIL_DT DATE,
EMAIL_SEQ NUMBER,
DMG_ID VARCHAR2(10),
EMAIL_SUB VARCHAR2(256)
)

Unique Index EMP_ID, BDG_ID, EMAIL_ADDR, EMAIL_CD, EMAIL_DT, EMAIL_SEQ

PARTITION BY HASH EMP_ID, BDG_ID

Table 2

EMP_DTL_NEW
(
EMP_ID VARCHAR2(10),
BDG_ID VARCHAR2(10),
EMAIL_ADDR VARCHAR2(56),
EMAIL_CD VARCHAR2(8),
EMAIL_DT DATE,
EMAIL_SEQ NUMBER,
DMG_ID VARCHAR2(10),
EMAIL_SUB VARCHAR2(256)
)
Please let me know thes best and fastest way to accomplish this insert.

Thanks in advance

Comments
Post Details
Added on Jan 29 2021
5 comments
724 views