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

From Heikki Linnakangas
Subject Re: Postgres batch write very slow - what to do
Date
Msg-id 45F6C99B.1080507@enterprisedb.com
Whole thread Raw
In response to Re: Postgres batch write very slow - what to do  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Postgres batch write very slow - what to do
List pgsql-performance
Tom Lane wrote:
> It sounds like you're incurring a network round trip for each row, which
> will be expensive even for a co-located application.  Perhaps Oracle's
> JDBC driver is smart enough to avoid that.  I'm not sure what tricks are
> available for bulk loading with our JDBC driver --- the page Heikki
> mentioned explains things from a server perspective but I dunno how that
> translates into JDBC.  The folks who hang out on pgsql-jdbc could
> probably give you some tips.

OP said he's using addBatch/executeBatch with a batch size of 100. The
JDBC driver sends the whole batch before waiting for responses.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

pgsql-performance by date:

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