Re: jdbc spec violation for autocommit=true & addbatch/executeBatch - Mailing list pgsql-jdbc

From Vitalii Tymchyshyn
Subject Re: jdbc spec violation for autocommit=true & addbatch/executeBatch
Date
Msg-id 4D36B3C7.1030309@gmail.com
Whole thread Raw
In response to Re: jdbc spec violation for autocommit=true & addbatch/executeBatch  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: jdbc spec violation for autocommit=true & addbatch/executeBatch
List 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 by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: jdbc spec violation for autocommit=true & addbatch/executeBatch
Next
From: Maciek Sakrejda
Date:
Subject: Re: jdbc spec violation for autocommit=true & addbatch/executeBatch