pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Matt Mello <alien@spaceship.com>
Cc: PgSQL Performance ML <pgsql-performance@postgresql.org>
Subject: Re: Indexing foreign keys
Date: Mon, 27 Jan 2003 23:49:52 -0800 (PST)
Message-ID: <20030127234454.N88775-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <3E361946.4060000@spaceship.com>

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.




view thread (12+ messages)  latest in thread

Message-ID: <20030127234454.N88775-100000@megazone23.bigpanda.com>
Permalink:  ../20030127234454.N88775-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20030127234454.N88775-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, alien@spaceship.com
  Subject: Re: Indexing foreign keys
  In-Reply-To: <20030127234454.N88775-100000@megazone23.bigpanda.com>
  References: <3E361946.4060000@spaceship.com> <20030127234454.N88775-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox