pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christopher Petrilli <petrilli@gmail.com>
To: tim@se.linux.org
Cc: pgsql-performance@postgresql.org
Subject: Re: batch inserts are "slow"
Date: Tue, 3 May 2005 15:17:20 -0400
Message-ID: <59d991c4050503121725619c6d@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0505031942180.8117-100000@naskur.se.linux.org>
References: <59d991c405050208174b6ebbc@mail.gmail.com>
	<Pine.LNX.4.44.0505031942180.8117-100000@naskur.se.linux.org>

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



view thread (15+ messages)  latest in thread

Message-ID: <59d991c4050503121725619c6d@mail.gmail.com>
Permalink:  ../59d991c4050503121725619c6d@mail.gmail.com/
Also on:    postgresql.org/message-id/59d991c4050503121725619c6d@mail.gmail.com

 · 

reply

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: petrilli@gmail.com, tim@se.linux.org
  Subject: Re: batch inserts are "slow"
  In-Reply-To: <59d991c4050503121725619c6d@mail.gmail.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