Re: Yet another Performance Question - Mailing list pgsql-general

From Richard Huxton
Subject Re: Yet another Performance Question
Date
Msg-id 20010418143431.5AC5D2A3A7@mainbox.archonet.com
Whole thread Raw
In response to Re: Yet another Performance Question  (Konstantinos Agouros <elwood@agouros.de>)
List pgsql-general
Konstantinos Agouros <elwood@agouros.de> said:

> On Wed, Apr 18, 2001 at 02:59:53PM +0200, Patrik Kudo wrote:
> > Hi!
> >
> > I'm not 100% sure, but I think it would be much faster if you use COPY
> > instead of INSERT when you read in a lot of data from a file.
> Well unless I am the database owner I only can do copy and the script does
> some manipulation before it inserts...

Don't forget you can do \copy from stdin so you can pipe the output of your
script to psql.

Failing that, try batching inserts in transactions, a few hundred at a time.
That can speed things up. You'll need to find what figure works best for you.

- Richard Huxton

pgsql-general by date:

Previous
From: Lamar Owen
Date:
Subject: Re: 7.1 rpm problem
Next
From: martin.chantler@convergys.com
Date:
Subject: Re: Yet another Performance Question