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

Re: LOCK TABLE & speeding up mass data loads

From: Curt Sampson <cjs(at)cynic(dot)net>
To: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
Cc: PgSQL Performance ML <pgsql-performance(at)postgresql(dot)org>
Subject: Re: LOCK TABLE & speeding up mass data loads
Date: 2003-01-26 23:10:09
Message-ID: Pine.NEB.4.51.0301270808260.596@angelic.cynic.net (view raw or flat)
Thread:
Lists: pgsql-performance
On Sun, 25 Jan 2003, Ron Johnson wrote:

> > Oh, and you're using COPY right?
>
> No.  Too much data manipulation to do 1st.  Also, by committing every
> X thousand rows, then if the process must be aborted, then there's
> no huge rollback, and the script can then skip to the last comitted
> row and pick up from there.

I don't see how the amount of data manipulation makes a difference.
Where you now issue a BEGIN, issue a COPY instead. Where you now INSERT,
just print the data for the columns, separated by tabs. Where you now
issue a COMMIT, end the copy.

cjs
-- 
Curt Sampson  <cjs(at)cynic(dot)net>   +81 90 7737 2974   http://www.netbsd.org
    Don't you know, in this new Dark Age, we're all light.  --XTC

In response to

Responses

pgsql-performance by date

Next:From: Bruce MomjianDate: 2003-01-27 00:54:25
Subject: Re: [PERFORM] optimizing query
Previous:From: Medve GaborDate: 2003-01-26 21:24:41
Subject: bigserial vs serial - which one I'd have to use?

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