Re: Indexing foreign keys - Mailing list pgsql-performance

From Stephan Szabo
Subject Re: Indexing foreign keys
Date
Msg-id 20030127234454.N88775-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Indexing foreign keys  (Matt Mello <alien@spaceship.com>)
List pgsql-performance
On Mon, 27 Jan 2003, Matt Mello wrote:

> Yes.  In IFX, when you create a FK, it seems to create indexes
> automatically for you, just like PG does with PK's.
>
> In fact, I can't imagine a situation where you would NOT want a FK
> indexed.  I guess there must be one, or else I'm sure the developers
> would have already added auto-creation of indexes to the FK creation, as
> well.

Any case where the pk table is small enough and the values are fairly
evenly distributed so that the index isn't very selective.  You end up not
using the index anyway because it's not selective and you pay the costs
involved in keeping it up to date.


pgsql-performance by date:

Previous
From: Matt Mello
Date:
Subject: Re: Indexing foreign keys
Next
From: Curt Sampson
Date:
Subject: Re: 7.3.1 New install, large queries are slow