From: Steinar H. Gunderson <sgunderson@bigfoot.com>
To: pgsql-performance@postgresql.org
Subject: Re: How to speed-up inserts with jdbc
Date: Thu, 11 Nov 2004 11:04:18 +0100
Message-ID: <20041111100418.GA2116@uio.no> (raw)
In-Reply-To: <376dd19504111100044aa0ca1e@mail.gmail.com>
References: <003201c4c68e$8d347ee0$a702a8c0@shanepc>
<FF2CC26B-3318-11D9-9406-000D9366F0C4@torgo.978.org>
<41921CFD.7060604@webde-ag.de>
<376dd19504111100044aa0ca1e@mail.gmail.com>
On Thu, Nov 11, 2004 at 04:04:06PM +0800, Edwin Eyan Moragas wrote:
> how about using PreparedStatment? that's on the java end.
> on the pg end, maybe do a BEGIN before the for loop and
> END at the end of the for loop.
You don't even need a "BEGIN" and "END"; his code has a setAutoComit(true)
before the for loop, which just has to be changed to setAutoCommit(false)
(and add an explicit commit() after the for loop, of course).
/* Steinar */
--
Homepage: http://www.sesse.net/
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: sgunderson@bigfoot.com
Subject: Re: How to speed-up inserts with jdbc
In-Reply-To: <20041111100418.GA2116@uio.no>
* 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