From: Alan Stange <stange@rentec.com>
To: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: executeBatch() issue with new driver?
Date: Tue, 02 Nov 2004 15:18:44 -0500
Message-ID: <4187EBA4.2040100@rentec.com> (raw)
In-Reply-To: <Pine.BSO.4.56.0411021427540.3642@leary.csoft.net>
References: <4187B025.2090201@rentec.com>
<Pine.BSO.4.56.0411021411070.17267@leary.csoft.net>
<4187DF2E.3030302@rentec.com>
<Pine.BSO.4.56.0411021427540.3642@leary.csoft.net>
Kris Jurka wrote:
>On Tue, 2 Nov 2004, Alan Stange wrote:
>
>
>
>>>This is something (as discussed with Dave) that you shouldn't be doing,
>>>
>>>
>>>
>>Let me be devils advocate for a second and ask "why not"? I don't
>>disagree, but I'm not sure I understand all the issues here.
>>
>>
>>
>
>The real problem is that executeBatch() returns an int[] of update counts.
>What should we return for an entry like addBatch("INSERT ... ; INSERT
>..."); ? Two individual entries? The sum of the update counts? The
>javadoc for executeBatch isn't entirely clear, but certainly seems to make
>the assumption that one batch entry is one command.
>
This was what I was thinking. What does the pg74 driver do in this
case as it does allow multiple statements in each batch?
> Especially since you
>are already using addBatch, there doesn't seem to be much point in jamming
>two commands into one batch.
>
>
Network latency. We were able to greatly increase performance this way
by reducing the number of round trips.
-- Alan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: stange@rentec.com, books@ejurka.com
Subject: Re: executeBatch() issue with new driver?
In-Reply-To: <4187EBA4.2040100@rentec.com>
References: <4187B025.2090201@rentec.com> <Pine.BSO.4.56.0411021411070.17267@leary.csoft.net> <4187DF2E.3030302@rentec.com> <Pine.BSO.4.56.0411021427540.3642@leary.csoft.net> <4187EBA4.2040100@rentec.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox