Re: jdbc batch performance problem - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: jdbc batch performance problem
Date
Msg-id Pine.LNX.4.33.0307201847560.4405-100000@leary.csoft.net
Whole thread Raw
In response to Re: jdbc batch performance problem  (pginfo <pginfo@t1.unisoftbg.com>)
List pgsql-jdbc

> If as you say it do not exist any diference I think it will be
> possible to improve executeBatch.
> For example for it's implementation to use the pg copy command.
> Exist at the moment any work for improving the batch commands?
>

To use COPY instead of insert during executeBatch would require some
complicated parsing of the statement to determine if it was really a
simple insert that could be translated into COPY.  If your statement had a
function call or a subselect it could not use COPY.  Also I'm not sure
what translating an INSERT into a COPY would do if you we're inserting
into a table that had rules on it.

There was a patch around that provided an API to use COPY explicitly which
might suit your needs.

Kris Jurka


pgsql-jdbc by date:

Previous
From: Dima Tkach
Date:
Subject: Re: Prepared Statements
Next
From: Oliver Jowett
Date:
Subject: Re: Prepared Statements