Re: JDBC addBatch more efficient?

From: David Wall <d(dot)wall(at)computer(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: JDBC addBatch more efficient?
Date: 2008-04-21 15:28:25
Message-ID: 480CB299.4050409@computer.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> Does this means that the two features are independent one from each
> other ?
> In other words, can we say that JDBC batch will limit information
> exchange between client and server while Postgres prepared statements
> will optimize their execution ?
I've not used it yet, but my impression is that you can use
PreparedStatements (in a loop typically), often surrounded by jdbc
transaction commit so each statement doesn't run in its own
transactions, do an addBatch and then submit that so all of the
statements are executed by the server as a group. So in this case, yes,
they should be independent of each other.

David

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pau Marc Munoz Torres 2008-04-21 15:46:49 help with "plpgsql"
Previous Message Ivano Luberti 2008-04-21 15:11:18 Re: JDBC addBatch more efficient?