Search Postgresql Archives

Re: on update / on delete performance of foreign keys

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In article <41F5088D.8060702@xxxxxxxx>,
"Florian G. Pflug" <fgp@xxxxxxxx> writes:

>> PostgreSQL doesn't automatically add indexes to foreign-key
>> columns. That sounds like the issue to me.

> Oh... *feeling a bit stupid*... Seems that I got confused, because it
> requires an index to exist on the referenced table (To speed up inserts,
> updates), but not on the referencing table...

That's not quite right.  What PostgreSQL (or any other DBMS) requires
from the referenced table is a UNIQUE constraint on the column in
question so that the referencing table points to a single row, and
UNIQUE constraints are usually implemented by indices.


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux