Home » RDBMS Server » Server Administration » 2milion records to be inserted
2milion records to be inserted [message #50034] Mon, 25 February 2002 03:55 Go to next message
sriraj
Messages: 5
Registered: February 2002
Junior Member
hi friends
we need to enter 2 milion records into a table1.we have script file that contains all insert statements to the table2.structure is same.my questions are
1.what is the shortest way to do this?
2.how much time it will take(assume 8 columns)?
3.if any problem comes during insertion,what to do?
give some suggestions.
sriraj
Re: 2milion records to be inserted [message #50035 is a reply to message #50034] Mon, 25 February 2002 04:07 Go to previous messageGo to next message
Manu Gupta
Messages: 44
Registered: January 2002
Member
Dear Sriraj,

If both the table are same then rather then running script file you drop the table1 and recreate the table with

CREATE TABLE TABLE1 AS SELECT.............

I feel this will do your job in shorter time.
I don't know how much time it will take. It totally depend on the system and oracle configuration.

Make sure that you have enough disk space before doing it.
Re: 2milion records to be inserted [message #50038 is a reply to message #50034] Mon, 25 February 2002 05:02 Go to previous messageGo to next message
Sanjay Bajracharya
Messages: 279
Registered: October 2001
Location: Florida
Senior Member
You may wanna consider 'nologging'

create table table1 nologging as select * from table2;
Re: 2milion records to be inserted [message #50073 is a reply to message #50034] Wed, 27 February 2002 04:22 Go to previous message
kiran
Messages: 503
Registered: July 2000
Senior Member
SQL * loader wuld be a better option too.
disabling any triggers and constraints could also be considered, if u are sure that the data is correct.
Previous Topic: Large Table
Next Topic: how do i track the user who is changing the password
Goto Forum:
  


Current Time: Mon Jul 08 10:57:57 CDT 2024