Re: jdbc spec violation for autocommit=true & addbatch/executeBatch
| От | Vitalii Tymchyshyn |
|---|---|
| Тема | Re: jdbc spec violation for autocommit=true & addbatch/executeBatch |
| Дата | |
| Msg-id | 4D36B3C7.1030309@gmail.com обсуждение исходный текст |
| Ответ на | Re: jdbc spec violation for autocommit=true & addbatch/executeBatch (Oliver Jowett <oliver@opencloud.com>) |
| Ответы |
Re: jdbc spec violation for autocommit=true & addbatch/executeBatch
|
| Список | pgsql-jdbc |
18.01.11 23:31, Oliver Jowett написав(ла):
>
> I'm not sure if we can implement this according to the current spec
> without losing any performance benefit of addBatch()/executeBatch() -
> we'd have to send a Sync after every individual query.
But is roundtrip needed for each sync? Can't we send all the data + as
much syncs as needed and then collect responses. The only thing that
bothers me is famous bug when receive and then send buffer overflows.
> As a workaround I suggest you just run the queries individually, not
> in a batch - there won't be much performance difference. (And if you
> really don't care about ordering or atomicity as you imply, you could
> parallelize it across multiple connections if latency is a problem)
How about addBatch("commit") after each addBatch("update")? This should
work in very similar way to sending Sync after each query.
Best regards, Vitalii Tymchyshyn
В списке pgsql-jdbc по дате отправления: