Re: Optimizing huge inserts/copy's - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: Optimizing huge inserts/copy's
Date
Msg-id Pine.BSF.4.10.10008301302010.62222-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Optimizing huge inserts/copy's  (Jie Liang <jliang@ipinc.com>)
List pgsql-sql
On Wed, 30 Aug 2000, Jie Liang wrote:

> Hi,
> 
> I knew that if no constarint, it populate very quick, my question is:
> when two tables have been
> reloaded, then I want to add a foreign key constraint to it, say:
> tableA has primary key column (id)
> tableB has a column (id) references it, so I say:
> ALTER TABLE tableB ADD CONSTRAINT distfk FOREIGN KEY (id) REFERENCES
> tableA(id)  ON DELETE CASCADE ;

Yeah, the alter table has to check that the constraint is valid.  There
might be a faster way than the current "scan through table calling
trigger function" mechanism, although doing most of them starts pulling
logic for the obeying constraint into multiple places.



pgsql-sql by date:

Previous
From: Jie Liang
Date:
Subject: Re: Optimizing huge inserts/copy's
Next
From: Tom Lane
Date:
Subject: Re: Optimizing huge inserts/copy's