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!

insert/select one million rows at a time from source to target table

905989Oct 31 2012 — edited Nov 2 2012
Hi,

Oracle 10.2.0.4.0

I am trying to insert around 10 million rows into table target from source as follows:
INSERT /*+ APPEND NOLOGGING */ INTO target
SELECT *
FROM source f
WHERE
        NOT EXISTS(SELECT 1 from target m WHERE f.col1 = m.col2 and f.col2 = m.col2);
There is a unique index on target table on col1,col2

I was having issues with undo and now I am getting the follwing error with temp space
ORA-01652: unable to extend temp segment by 64 in tablespace TEMP
I believce it would be easier if I did bulk insert one million rows at a time and commit.

I appriciate any advice on this please.

Thanks,

Ashok
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 30 2012
Added on Oct 31 2012
21 comments
4,668 views