Re: Foreign Key Columns And Indices - Mailing list pgsql-hackers

From Jan Wieck
Subject Re: Foreign Key Columns And Indices
Date
Msg-id 200102061257.HAA01022@jupiter.greatbridge.com
Whole thread Raw
In response to Re: Foreign Key Columns And Indices  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-hackers
Stephan Szabo wrote:
>
> On Mon, 5 Feb 2001, Christopher Kings-Lynne wrote:
>
> > Just a quick question, when a column of a table is defined to be a foreign
> > key, is it implicitly indexed, or does one still need to explicitly CREATE
> > INDEX?
>
> The foreign key columns are not currently implicitly indexed but you may
> wish to index them if you're using a referential action other than no
> action or restrict.
   You'd  probably  want  to index them either way, because even   "NO ACTION" and "RESTRICT" mean  that  a  scan  for
existing  references is done on updates/deletes to the PK.
 


Jan

--

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



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



pgsql-hackers by date:

Previous
From: Karel Zak
Date:
Subject: Re: a contrib function to query current locale values
Next
From: Brent Verner
Date:
Subject: Re: 7.1beta4 RPMs.