Re: Postgres batch write very slow - what to do

From: "hubert depesz lubaczewski" <depesz(at)gmail(dot)com>
To: femski <hypertree(at)yahoo(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Postgres batch write very slow - what to do
Date: 2007-03-17 04:52:39
Message-ID: 9e4684ce0703162152u4abe97fcg64d0804f57ce95b1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 3/13/07, femski <hypertree(at)yahoo(dot)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/

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Vincenzo Romano 2007-03-18 06:50:54 function call vs staright query
Previous Message Erik Jones 2007-03-16 19:22:04 Re: PostgreSQL 8.2.3 VACUUM Timings/Performance