Postgres batch write very slow - what to do - Mailing list pgsql-performance

From femski
Subject Postgres batch write very slow - what to do
Date
Msg-id 9452092.post@talk.nabble.com
Whole thread Raw
Responses Re: Postgres batch write very slow - what to do  (Heikki Linnakangas <heikki@enterprisedb.com>)
Re: Postgres batch write very slow - what to do  ("Merlin Moncure" <mmoncure@gmail.com>)
Re: Postgres batch write very slow - what to do  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: Postgres batch write very slow - what to do  ("hubert depesz lubaczewski" <depesz@gmail.com>)
List pgsql-performance
Folks !

I have a batch application that writes approx. 4 million rows into a narrow
table. I am using JDBC addBatch/ExecuteBatch with auto commit turned off.
Batch size is 100. So far I am seeing Postgres take roughly five times the
time it takes to do this in the Oracle.

I have played with many parameters. Only one that seems to have any affect
is fsync - but thats only 10% or so.
Initially I got the warning that checkpoints were happening too often so I
increased the segments to 24. Warnings stopped, but no real improvement in
performance.

Is postgres really that slow ? What am I missing ?

Here are the changes to my postgressql.cong file.

shared_buffers = 768MB
work_mem = 256MB
maintenance_work_mem = 128MB
fsync = off

checkpoint_segments = 24
autovacuum = on

Thank you,

-Sanjay
--
View this message in context: http://www.nabble.com/Postgres-batch-write-very-slow---what-to-do-tf3395195.html#a9452092
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.


pgsql-performance by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Execution plan changed after upgrade from 7.3.9 to 8.2.3
Next
From: Heikki Linnakangas
Date:
Subject: Re: Postgres batch write very slow - what to do