From: | Vitalii Tymchyshyn <tivv00(at)gmail(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: jdbc spec violation for autocommit=true & addbatch/executeBatch |
Date: | 2011-01-19 09:49:59 |
Message-ID: | 4D36B3C7.1030309@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | aleksvp | 2011-01-19 13:51:31 | CREATE TYPE and Java Mapping |
Previous Message | Thomas Kellerer | 2011-01-18 22:45:59 | Re: jdbc spec violation for autocommit=true & addbatch/executeBatch |