Re: Question about Foreign key constraint causes "costly

From: Emi Lu <emilu(at)cs(dot)concordia(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Question about Foreign key constraint causes "costly
Date: 2005-08-23 15:20:04
Message-ID: 430B3EA4.6000604@cs.concordia.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks a lot for all helps. I do not have warnings anymore :-)

>>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).
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Grittner 2005-08-23 15:21:16 Where to get 8.1 beta test version?
Previous Message Michael Fuhr 2005-08-23 15:18:05 Re: Import File