pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: femski <hypertree@yahoo.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgres batch write very slow - what to do
Date: Tue, 13 Mar 2007 15:56:11 +0000
Message-ID: <45F6C99B.1080507@enterprisedb.com> (raw)
In-Reply-To: <2563.1173799749@sss.pgh.pa.us>
References: <9452092.post@talk.nabble.com>
	<45F685B7.5040001@enterprisedb.com>
	<9453712.post@talk.nabble.com>
	<2563.1173799749@sss.pgh.pa.us>

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



view thread (20+ messages)  latest in thread

Message-ID: <45F6C99B.1080507@enterprisedb.com>
Permalink:  ../45F6C99B.1080507@enterprisedb.com/
Also on:    postgresql.org/message-id/45F6C99B.1080507@enterprisedb.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: heikki@enterprisedb.com, tgl@sss.pgh.pa.us, hypertree@yahoo.com
  Subject: Re: Postgres batch write very slow - what to do
  In-Reply-To: <45F6C99B.1080507@enterprisedb.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