pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Giuseppe Sacco <giuseppe@eppesuigoccas.homedns.org>
To: pgsql-jdbc@postgresql.org
Subject: Re: Poor addBatch performance. Why dosn't it use copy ?
Date: Fri, 20 Apr 2007 14:54:59 +0200
Message-ID: <1177073699.5343.45.camel@scarafaggio> (raw)
In-Reply-To: <1177069985.5343.33.camel@scarafaggio>
References: <10099075.post@talk.nabble.com>
	<1177069985.5343.33.camel@scarafaggio>

[send post, since the first one was rejected by MTA]

Hi femski,

Il giorno ven, 20/04/2007 alle 04.39 -0700, femski ha scritto:
[...]
> Why doesn't the Postgres JDBC driver use "copy" for faster bulk insert ?
> What is the best way to speedup
> do bulk insert at this time or in near future (I was to use standard JDBC
> API) ?

I use addBatch() very often when, but I use it with statement that work
on different tables. I think it would really be difficult to check if
the statements are referring the same table and the same field.

Why don't you write all record in one insert statement like "INSERT INTO
table (fields) VALUES (...,...), (...,...), (...,..);" I think both
oracle and postgres 8.2 should accept this syntax.

Bye,
Giuseppe



view thread (5+ messages)  latest in thread

Message-ID: <1177073699.5343.45.camel@scarafaggio>
Permalink:  ../1177073699.5343.45.camel@scarafaggio/
Also on:    postgresql.org/message-id/1177073699.5343.45.camel@scarafaggio

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: giuseppe@eppesuigoccas.homedns.org
  Subject: Re: Poor addBatch performance. Why dosn't it use copy ?
  In-Reply-To: <1177073699.5343.45.camel@scarafaggio>
  References: <10099075.post@talk.nabble.com> <1177069985.5343.33.camel@scarafaggio> <1177073699.5343.45.camel@scarafaggio>

* 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