Performance of jdbc insert statements and select nextval - Mailing list pgsql-jdbc

From ralf.baumhof@bgs-ag.de
Subject Performance of jdbc insert statements and select nextval
Date
Msg-id OF1AE9FE8F.A62C4576-ONC1257561.0053E641-C1257561.00534F39@LocalDomain
Whole thread Raw
Responses Re: Performance of jdbc insert statements and select nextval  (Dave Cramer <pg@fastcrypt.com>)
Re: Performance of jdbc insert statements and select nextval  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc

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.normal {font-family: "Arial";font-size: 8pt;font-style: italic} .fett {font-family: "Arial";font-size: 10pt;font-style: italic;font-weight: bold; color: navy}
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
BGS Systemplanung AG

 Ein Unternehmen der nextevolution consulting group

pgsql-jdbc by date:

Previous
From: Lutischán Ferenc
Date:
Subject: Re: JDBC bug?
Next
From: Dave Cramer
Date:
Subject: Re: Performance of jdbc insert statements and select nextval