1. Try using COPY Command, you will see significant decrease in the loading
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.
On Tue, Apr 27, 2010 at 10:09 PM, <A(dot)Bhattacharya(at)sungard(dot)com> 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?
> 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
In response to
pgsql-general by date
|Next:||From: Andy Colson||Date: 2010-04-30 01:59:34|
|Subject: Re: sql help, reusing a column|
|Previous:||From: Craig Ringer||Date: 2010-04-29 23:39:09|
|Subject: Re: Recovering Data from a crashed database|