Re: jdbc batch performance problem

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: jdbc batch performance problem
Дата
Msg-id 1058626828.1674.5.camel@localhost.localdomain
обсуждение исходный текст
Ответ на jdbc batch performance problem  (pginfo <pginfo@t1.unisoftbg.com>)
Список pgsql-jdbc
Hi,

You can try dropping the index before doing the inserts and rebuilding
it afterwards, that may help.
On Sat, 2003-07-19 at 02:52, pginfo wrote:
> 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.
this is not comparing apples to apples, the insert into ... does
everything on the backend, jdbc has to get the data to the server.
>
> Exist any basic performance problem for pg jdbc or I make mistake?
> Also I testet the same example on oracle 8i and mysql.

How was this test done? For instance did you use transactions with
mysql? did you use their jdbc interface, was the connection to the
database the same speed in each case?


> It is working much much better.
> I love pg but it will be great if I can make insert faster.
>
> Many thanks,
> ivan.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
--
Dave Cramer <Dave@micro-automation.net>


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Fernando Nasser
Дата:
Сообщение: Re: Prepared Statements
Следующее
От: "Dave Page"
Дата:
Сообщение: FW: [webmaster] website issues