Re: Foreign keys and indexes

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Marc Compte <mcompte(at)sigte(dot)udg(dot)es>, pgsql-general(at)postgresql(dot)org
Subject: Re: Foreign keys and indexes
Date: 2007-06-05 13:16:33
Message-ID: 698551.87665.qm@web31807.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Does PostgreSQL create an implicit index also for foreign keys? or must
> I create it explicitly?

No, you foreign keys are not automatically indexed. They only way they would be is if the FK is
part of a composite unique or primary key. So you will probably have to create your one indexes
on FKs.

Regards,
Richard Broersma Jr.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2007-06-05 13:20:31 Re: Foreign keys and indexes
Previous Message Ranieri Mazili 2007-06-05 13:11:59 CREATE RULE with WHERE clause