Re: PostgreSQL Performance issue

From: DM <dm(dot)aeqa(at)gmail(dot)com>
To: A(dot)Bhattacharya(at)sungard(dot)com
Cc: Rob(dot)Richardson(at)rad-con(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL Performance issue
Date: 2010-04-29 23:57:02
Message-ID: n2zeae6a62a1004291657g4e1bc77bm3b464c085d4c7557@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello there,

1. Try using COPY Command, you will see significant decrease in the loading
time.
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(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?
>
>
>
> 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
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andy Colson 2010-04-30 01:59:34 Re: sql help, reusing a column
Previous Message Craig Ringer 2010-04-29 23:39:09 Re: Recovering Data from a crashed database