Re: JDBC addBatch more efficient?

From: Kris Jurka <books(at)ejurka(dot)com>
To: David Wall <d(dot)wall(at)computer(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: JDBC addBatch more efficient?
Date: 2008-04-21 07:11:25
Message-ID: Pine.BSO.4.64.0804210306420.25756@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, 20 Apr 2008, David Wall wrote:

> Just checking if the JDBC library's batch processing code is more efficient
> with respect to the postgresql back end or not. Does it really batch the
> requests and submit them once over the link, or does it just send them to the
> database to be processed one at a time?
>

The JDBC driver's batch processing is more efficient than regular
execution because it requires fewer network roundtrips so there's less
waiting. The JDBC batch is broken into an internal batch size of 256
statement and all of these are sent over to the server at once.

Kris Jurka

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Klint Gore 2008-04-21 07:32:29 Re: Insert Rewrite rules
Previous Message David 2008-04-21 06:51:41 Insert Rewrite rules