From: Dave Cramer <pg@fastcrypt.com>
To: ralf.baumhof@bgs-ag.de
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Performance of jdbc insert statements and select nextval
Date: Wed, 18 Feb 2009 12:29:39 -0500
Message-ID: <491f66a50902180929x3d9e89f2u3a13b88eecbcb588@mail.gmail.com> (raw)
In-Reply-To: <OF1AE9FE8F.A62C4576-ONC1257561.0053E641-C1257561.00534F39@LocalDomain>
References: <OF1AE9FE8F.A62C4576-ONC1257561.0053E641-C1257561.00534F39@LocalDomain>
We would probably have to see the code to understand the problem better.
Dave
On Wed, Feb 18, 2009 at 10:25 AM, <ralf.baumhof@bgs-ag.de> wrote:
>
> i found the following problem:
>
> 10000 inserts with pgadmin tool into one table (primary key bigserial) can
> be done wihtin 3 seconds. If i perform the same job with jdbc this takes 13
> seconds. The insert statement is prepared only once, the statement for
> fetching the nextval also. If i omit the select nextval execution time
> improves to 8 seconds. Can anybody tell me why jdbc is 3 to four times
> slower than pgadmin? I am using Postgresql 8.2 and 8.3 Database server, java
> 1.5 and 1.6 and i tried the drivers 8.2 and 8.3 in type 3 and type 4. The
> execution times are always identical.
>
> thanks, Ralf
> ------------------------------
> BGS Beratungsgesellschaft
> Software Systemplanung AG *Niederlassung Nord*
> Ebertstraße 21
> 26382 Wilhelmshaven
> Fon: +49 (0) 4421 / 9683-700
> Fax: +49 (0) 4421 / 9683-790
> www.bgs-ag.de *Geschäftssitz Mainz*
> *Registergericht*
> Amtsgericht Mainz
> HRB 62 50
> *Aufsichtsratsvorsitzender*
> Klaus Hellwig
> *Vorstand*
> Hanspeter Gau
> Hermann Kiefer
> Nils Manegold [image: BGS Systemplanung AG] <http://www.bgs-ag.de;
>
> [image: Ein Unternehmen der nextevolution consulting group]<http://www.nextevolution.de;
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: pg@fastcrypt.com, ralf.baumhof@bgs-ag.de
Subject: Re: Performance of jdbc insert statements and select nextval
In-Reply-To: <491f66a50902180929x3d9e89f2u3a13b88eecbcb588@mail.gmail.com>
References: <OF1AE9FE8F.A62C4576-ONC1257561.0053E641-C1257561.00534F39@LocalDomain> <491f66a50902180929x3d9e89f2u3a13b88eecbcb588@mail.gmail.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