Re: [GENERAL] equivalent of sqlload?

From: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
To: "Michael A(dot) Koerber" <mak(at)ll(dot)mit(dot)edu>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] equivalent of sqlload?
Date: 1998-11-29 10:08:31
Message-ID: l03110702b286cd256570@[147.233.159.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 21:01 +0200 on 25/11/98, Michael A. Koerber wrote:

>
> Now...I have broken the "copy" process down into smaller chunks and make
> multiple calls to "copy". I have a total of about 5.4 million records and
> the job isn't done yet...my Pentium 433 has been working on this copy for
> over 24 hours.

Try putting all the separate COPYs in one transaction.

BEGIN TRANSACTION;
COPY...
COPY...
COPY...
END;

Without the surrounding transaction, each copy is a transaction and
requires transaction overhead. I don't know how much time this will save,
though. Are you sure you dropped all the indices? When you declare a
primary key it declares a unique index, so watch out for that as well.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Herouth Maoz 1998-11-29 10:33:41 Re: [GENERAL] Typecasting datetype as date. How do I cope with NULLs?
Previous Message Ulf Mehlig 1998-11-29 08:04:51 Re: [GENERAL] PostgreSQL and WWW