Hello there,
2. Turn off auto commit and Remove foreign key constraints if it is only one time load - this will also help in decreasing the load time.
Try these options and let us know how it went.
We load around 6M rows of data into a table using copy command it takes few mins to load the data and system configuration is not that high too. Also one more thing we use linux box over here.
Do a small test as to how long will it take to do 1000 inserts into a similar table and send us your timings and definition of the table. I will compare against mine.
Thanks
Deepak
On Tue, Apr 27, 2010 at 10:09 PM, <A.Bhattacharya@xxxxxxxxxxx> wrote:
I am curious to know how much of your delay is due to PostgreSQL and how much to your Java batch program. If you comment out the call to the database function, so that you are reading your input file but not doing anything with the data, how long does your batch program take to run?
RobR
--
The Java program hardly takes a minute to process all the flat files but at the time inserting the records into the db, the entire process takes more than 4 hours.
Many thanks