jdbc batch performance problem

From: pginfo <pginfo(at)t1(dot)unisoftbg(dot)com>
To: "'pgsql-jdbc(at)postgresql(dot)org'" <pgsql-jdbc(at)postgresql(dot)org>
Subject: jdbc batch performance problem
Date: 2003-07-19 06:52:12
Message-ID: 3F18EA9C.24B78DF2@t1.unisoftbg.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

I am using pg + jdbc for j2ee development from a long time.
The main problem I found is the very bad insert performance.
I am using addBatch and executeBatch for minimum network trafik,
but it is also very slow.
For example if I try to insert 1000 rows ( in one transaction) into very
simple table
it takes ~ 3000 ms. If i use insert into myTable select ... it takes
only 10 ms.

Exist any basic performance problem for pg jdbc or I make mistake?
Also I testet the same example on oracle 8i and mysql.
It is working much much better.
I love pg but it will be great if I can make insert faster.

Many thanks,
ivan.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Aaron Mulder 2003-07-19 07:03:20 Re: Prepared Statements
Previous Message Oliver Jowett 2003-07-19 06:06:24 Re: Prepared Statements