Re: JDBC batching

Поиск
Список
Период
Сортировка
От Tony DeWitt
Тема Re: JDBC batching
Дата
Msg-id CCELIKPGJPFFONABGGNOGEEMCAAA.dewitt@eizel.com
обсуждение исходный текст
Ответ на Re: JDBC batching  (Barry Lind <barry@xythos.com>)
Список pgsql-jdbc
Is there any way to execute batches of stored procedures?

The actual problem is that I want to do a batch of INSERTs, but it is likely
that at least one INSERT will fail - and postgres aborts the entire
transaction. I'd like to push some logic down into a stored procedure, but
maybe I just have to do a batch of DELETEs then a batch of INSERTs.


Thanks,
Tony


-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of Barry Lind
Sent: Tuesday, January 22, 2002 3:47 PM
To: Tony DeWitt
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] JDBC batching


Tony,

The batch API works in one round trip in 7.2.

thanks,
--Barry


Tony DeWitt wrote:

> I have looked through all the documentation that I can find, as well as
the
> mailing list archives, and I haven't been able to find the answer to this.
> I'm currently running pgsql 7.0.2.
>
> What I'm trying to do is make a large number of writes to a single table
in
> an efficient way. Currently our code makes a separate request for each
> INSERT statement, incurring too many round trips.
>
> I want to convert this to the batch interface, i.e., addBatch() and
> executeBatch(), but I read that this is implemented as multiple round
trips
> anyway in 7.1.x and before. I also read that this might be fixed in 7.2,
but
> I've been unable to verify this in the documentation.
>
> Can anyone enlighten me on the state of the batching interface? or is
there
> some better way to do this?
>
>
> Thank you,
> Tony DeWitt
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly


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

Предыдущее
От: "David De Mizio"
Дата:
Сообщение: Datasource question
Следующее
От: "Tony DeWitt"
Дата:
Сообщение: Re: JDBC batching