Re: Importing Large Amounts of Data - Mailing list pgsql-hackers

From Curt Sampson
Subject Re: Importing Large Amounts of Data
Date
Msg-id Pine.NEB.4.43.0204161049450.498-100000@angelic.cynic.net
Whole thread Raw
In response to Re: Importing Large Amounts of Data  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Mon, 15 Apr 2002, Bruce Momjian wrote:

> Can you check your load and see if there is a PRIMARY key on the table
> at the time it is being loaded.

There is not. I create the table with a PRIMARY KEY declaration,
but I drop that index before doing the import, and do an ALTER
TABLE to re-add the primary key afterwards.

At one point I tried doing a load with all indices enabled, but
after about eight or nine hours I gave up. (Typically the load
takes about 30 minutes. This is using about 2% of the sample data.)

> In the old days, we created indexes
> only after the data was loaded, but when we added PRIMARY key, pg_dump
> was creating the table with PRIMARY key then loading it, meaning the
> table was being loaded while it had an existing index.  I know we fixed
> this recently but I am not sure if it was in 7.2 or not.

Ah, I saw that fix. But I'm doing the load by hand, not using
pg_restore.

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



pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: Re: Importing Large Amounts of Data
Next
From: Peter Eisentraut
Date:
Subject: Re: Operators and schemas