From: Oliver Jowett <oliver@opencloud.com>
To: Kevin Murphy <murphy@genome.chop.edu>
Cc: pgsql-jdbc@postgresql.org
Cc: nwakefield@kineticnetworks.com
Subject: Re: psql COPY with JDBC
Date: Tue, 03 Apr 2007 14:23:19 +1200
Message-ID: <4611BA97.4060400@opencloud.com> (raw)
In-Reply-To: <46110BBF.10806@genome.chop.edu>
References: <46110BBF.10806@genome.chop.edu>
Kevin Murphy wrote:
> Also: I haven't seen evidence of a JDBC prepared statement approach for
> 8.2's multiple-row INSERTs (using multiple VALUES arguments). Does such
> a beast exist, or will it?
I assume you can do this without driver changes by preparing a suitable
statement. Presumably you'd do something like prepare a 20-row-insert
statement, use it until you have less than 20 rows left, then prepare
and use single-row-inserts for the remainder.
> Also: what exactly does the PostgreSQL driver do with INSERTs that are
> batched with addBatch? I must confess I haven't tried this yet.
It prepares them once and sends a pair of Bind/Execute messages for each
set of parameter values, with a Sync at the end. You can see the details
with loglevel=2
-O
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: oliver@opencloud.com, murphy@genome.chop.edu, nwakefield@kineticnetworks.com
Subject: Re: psql COPY with JDBC
In-Reply-To: <4611BA97.4060400@opencloud.com>
References: <46110BBF.10806@genome.chop.edu> <4611BA97.4060400@opencloud.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