Skip site navigation (1) Skip section navigation (2)

Re: bulk inserts

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: bulk inserts
Date: 2009-09-28 20:52:36
Message-ID: 20090928205236.GD5407@samason.me.uk (view raw or flat)
Thread:
Lists: pgsql-general
On Mon, Sep 28, 2009 at 10:38:05AM -0500, Dave Huber wrote:
> Using COPY is out of the question as the file is not formatted for
> that and since other operations need to occur, the file needs to be
> read sequentially anyway.

Just to expand on what Martin said; if you can generate a set of EXECUTE
commands, you can certainly generate a COPY command to insert the same
data.  The advantage is a large drop in parse time for inserting larger
numbers of rows.  As you're saying you want to insert 500 rows, I'd
suggest at least trying to get COPY working.

-- 
  Sam  http://samason.me.uk/

In response to

Responses

pgsql-general by date

Next:From: Magnus HaganderDate: 2009-09-28 20:59:11
Subject: pgday.eu 2009: Schedule available and registration open
Previous:From: Scott MarloweDate: 2009-09-28 20:48:39
Subject: Re: PostgreSQL reads each 8k block - no larger blocks are used - even on sequential scans

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group