Re: Optimizing huge inserts/copy's

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Optimizing huge inserts/copy's
Дата
Msg-id Pine.BSF.4.10.10008301302010.62222-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: Optimizing huge inserts/copy's  (Jie Liang <jliang@ipinc.com>)
Список 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 по дате отправления:

Предыдущее
От: Jie Liang
Дата:
Сообщение: Re: Optimizing huge inserts/copy's
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Optimizing huge inserts/copy's