pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@gmail.com>
To: femski <hypertree@yahoo.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgres batch write very slow - what to do
Date: Sat, 17 Mar 2007 05:52:39 +0100
Message-ID: <9e4684ce0703162152u4abe97fcg64d0804f57ce95b1@mail.gmail.com> (raw)
In-Reply-To: <9452092.post@talk.nabble.com>
References: <9452092.post@talk.nabble.com>

On 3/13/07, femski <hypertree@yahoo.com> wrote:
> 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.

you can try to use pg_bulkload.
since it is called as standard function you shouldn't have problems
with jdbc. and it's apparently fast.

depesz

http://pgfoundry.org/projects/pgbulkload/



view thread (20+ messages)

Message-ID: <9e4684ce0703162152u4abe97fcg64d0804f57ce95b1@mail.gmail.com>
Permalink:  ../9e4684ce0703162152u4abe97fcg64d0804f57ce95b1@mail.gmail.com/
Also on:    postgresql.org/message-id/9e4684ce0703162152u4abe97fcg64d0804f57ce95b1@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: depesz@gmail.com, hypertree@yahoo.com
  Subject: Re: Postgres batch write very slow - what to do
  In-Reply-To: <9e4684ce0703162152u4abe97fcg64d0804f57ce95b1@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox