Re: How to speed-up inserts with jdbc

From: "Steinar H(dot) Gunderson" <sgunderson(at)bigfoot(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: How to speed-up inserts with jdbc
Date: 2004-11-11 10:04:18
Message-ID: 20041111100418.GA2116@uio.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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/

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Allen Landsidel 2004-11-11 16:21:13 Re: Strange (?) Index behavior?
Previous Message Edwin Eyan Moragas 2004-11-11 08:04:06 Re: How to speed-up inserts with jdbc