Re: Shorthand for foreign key indices

From: "John D(dot) Burger" <john(at)mitre(dot)org>
To: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Shorthand for foreign key indices
Date: 2005-05-09 17:40:01
Message-ID: dbbc60f9cb5689925b4f02b1a919a2ad@mitre.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>> By the way, I presume foreign key indices are used to check for
>> referential integrity on insert. Can the query planner also use then
>> somehow?
>
> It can use them the same way it can use any other index.

Hmm, I guess I thought that "foreign key indices" were some special
kind of index. For instance, I thought that Postgresql might
effectively pre-compute part of the information it needed to do a join
on the two relevant columns.

I'm guessing now that we're just talking about a regular index on a
column that happens to have a foreign key reference to another column.
Is that the case?

Thanks.

- John D. Burger
MITRE

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2005-05-09 17:58:33 Re: Shorthand for foreign key indices
Previous Message Ben 2005-05-09 17:27:14 Re: Postgres and GnuPlot