Re: How to speed-up inserts with jdbc - Mailing list pgsql-performance

From Jeff
Subject Re: How to speed-up inserts with jdbc
Date
Msg-id 1DFE91CA-3320-11D9-9406-000D9366F0C4@torgo.978.org
Whole thread Raw
In response to How to speed-up inserts with jdbc  (Michael Kleiser <mkl@webde-ag.de>)
List pgsql-performance
On Nov 10, 2004, at 8:51 AM, Michael Kleiser wrote:
> It is trunning in in 10 Threads. Each thread makes 100 Inserts:
>
> For the 1000 Inserts (10 threads a 100 inserts)
> we need 8 seconds.
> That's 125 Insets / Seconds.
> How could we make it faster ?
>

Batch the inserts up into a transaction.

So you'd have
BEGIN
insert
insert
insert
...
COMMIT

Your numbers will suddenly sky rocket.

--
Jeff Trout <jeff@jefftrout.com>
http://www.jefftrout.com/
http://www.stuarthamm.net/


pgsql-performance by date:

Previous
From: Michael Kleiser
Date:
Subject: How to speed-up inserts with jdbc
Next
From: Dave Cramer
Date:
Subject: Re: How to speed-up inserts with jdbc