Re: make a unique index for foreign keys? - Mailing list pgsql-sql

From Jan Wieck
Subject Re: make a unique index for foreign keys?
Date
Msg-id 3D08CF8A.D945FC18@Yahoo.com
Whole thread Raw
In response to Re: make a unique index for foreign keys?  ("Beth Gatewood" <beth@vizxlabs.com>)
List pgsql-sql
Beth Gatewood wrote:
> 
> Chris/ Josh-
> 
> OK-response to Chris below.  Synopsis here....simply by creating a foreign
> key will not create an index.  On large tables I SHOULD put a non-unique
> index on the foreign key (right?)
   Right, because on DELETE or UPDATE to the primary key, the   RI triggers have to check that this doesn't leave
orphaned  references or do the required referential action (CASCADE).   Sometimes this works faster with an index...
 


Jan

-- 

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #


pgsql-sql by date:

Previous
From: Achilleus Mantzios
Date:
Subject: Re: how do i provide array parameters for my functions in php
Next
From: Josh Berkus
Date:
Subject: Re: Another postgres 'file not found' error