Re: Question about Foreign key constraint causes "costly sequential scans"?

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Question about Foreign key constraint causes "costly sequential scans"?
Дата
Msg-id 20050823150425.GA9588@winnie.fuhr.org
обсуждение исходный текст
Ответ на Question about Foreign key constraint causes "costly sequential scans"?  (Emi Lu <emilu@cs.concordia.ca>)
Ответы Re: Question about Foreign key constraint causes "costly  (Emi Lu <emilu@cs.concordia.ca>)
Список pgsql-general
On Tue, Aug 23, 2005 at 10:30:14AM -0400, Emi Lu wrote:
> I'd like to setup foreign key constraint for A.col3, as the following:
> CONSTRAINT Aclo3_fk FOREIGN KEY (col3) REFERENCES B(colB1)
>
> But I got a warning msg from postgresql as:
>
>   foreign key constraint "Aclo3_fk" will require costly sequential scans

Is there not a DETAIL message following this warning?  It should
explain the problem: the referring and the referred-to columns are
of different types.

Additionally, it's usually a good idea to create an index on the
referring column (A.col3) to speed up referential integrity checks
when modifying the referred-to table (B).

--
Michael Fuhr

В списке pgsql-general по дате отправления:

Предыдущее
От: Matt Miller
Дата:
Сообщение: Re: Question about Foreign key constraint causes "costly
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Import File