Skip to Main Content

Oracle Database Discussions

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!

"Create Table from select Query" Vs "Insert into"

Knidhi-OracleSep 28 2011 — edited Sep 28 2011
Hi
Schenaio:
My Select Query returns more than 10 million records, these records needs to be inserted into another table.
Approach 1:
I created table called TABLE1, and inserted the records using INSERT statement as a batch (batch size is 5000).
Approach 2:
I create table like,
CREATE TABLE TABLE1 AS <SELECT QUERY>

Here Apporach-1 took almost 40 minutes to complete the insert but Approach-2 took only 6 minutes.

If anybody knows why it is? And is there any way to improve the performance of Approach-1?.

Thanks
Nidhi
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2011
Added on Sep 28 2011
7 comments
1,226 views