Re: Shorthand for foreign key indices

From: Brendan Jurd <direvus(at)gmail(dot)com>
To: "John D(dot) Burger" <john(at)mitre(dot)org>
Cc: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Shorthand for foreign key indices
Date: 2005-05-09 18:03:53
Message-ID: 37ed240d05050911035bb92079@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> 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?
>

That's true, but just as the query planner can use an index for WHERE
conditions, it can use an index for a join condition. So if you've
got an index on your foreign key, the planner has the opportunity to
use the index any join operations across that foreign key.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Fein 2005-05-09 18:15:42 Re: Function to return number of words in a string?
Previous Message Scott Marlowe 2005-05-09 17:58:33 Re: Shorthand for foreign key indices