Re: batch inserts are "slow" - Mailing list pgsql-performance

From Christopher Petrilli
Subject Re: batch inserts are "slow"
Date
Msg-id 59d991c4050503121725619c6d@mail.gmail.com
Whole thread Raw
In response to Re: batch inserts are "slow"  (Tim Terlegård <tim@se.linux.org>)
List pgsql-performance
On 5/3/05, Tim Terlegård <tim@se.linux.org> wrote:
> > Just as on Oracle you would use SQL*Loader for this application, you
> > should use the COPY syntax for PostgreSQL.  You will find it a lot
> > faster.  I have used it by building the input files and executing
> > 'psql' with a COPY command, and also by using it with a subprocess,
> > both are quite effective.
>
> I tried this now. Now it's down to 0.45 seconds. It feels a bit hacky to
> run /usr/bin/psql from java, but it sure works. Thanks for the hint!

It may feel hacky, but I think if you want to use SQL*Loader on
Oracle, you have to do the same thing.  I know a C++ app that I use
that runs SQL*Loader about once per second to deal with a HUGE volume
(10K/sec).  In fact, moving the load files onto ramdisk has helped a
lot.

Chris
--
| Christopher Petrilli
| petrilli@gmail.com

pgsql-performance by date:

Previous
From: Mischa Sandberg
Date:
Subject: Re: COPY vs INSERT
Next
From: Dave Cramer
Date:
Subject: Re: batch inserts are "slow"