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

Re: Optimizing huge inserts/copy's

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Jie Liang <jliang(at)ipinc(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Optimizing huge inserts/copy's
Date: 2000-08-30 01:55:42
Message-ID: Pine.BSF.4.10.10008291853170.57698-100000@megazone23.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-sql
On Tue, 29 Aug 2000, Jie Liang wrote:

> Hi, there,
> 
> 1. use copy ... from '.....';
> 2. write a PL/pgSQL function and pass multiple records as an array.
> 
> However, if your table have a foreign key constraint, it cannot be speed
> up,
> 
> I have same question as you, my table invloving 9-13 million rows, I
> don't
> know how can I add a foreign key them also?

I haven't tried it on really large tables, but does it turn out faster to
use ALTER TABLE ADD CONSTRAINT to add the foreign key constraint after the
data is loaded and the indexes are created?


In response to

Responses

pgsql-sql by date

Next:From: Webb SpragueDate: 2000-08-30 03:52:15
Subject: Re: Create Primary Key + Massive Copy's?
Previous:From: Jie LiangDate: 2000-08-30 01:50:53
Subject: Re: Create Primary Key?

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