Re: Why the planner is not using the INDEX . - Mailing list pgsql-performance

From Bruno Wolff III
Subject Re: Why the planner is not using the INDEX .
Date
Msg-id 20050705123217.GA11379@wolff.to
Whole thread Raw
In response to Re: Why the planner is not using the INDEX .  (David Gagnon <dgagnon@siunik.com>)
List pgsql-performance
On Mon, Jul 04, 2005 at 20:29:50 -0400,
  David Gagnon <dgagnon@siunik.com> wrote:
> Thanks .. I miss that FK don't create indexed ...  since Primary key
> implicitly does ...
>
> I'm a bit surprised of that behavior thought, since it means that if we
> delete a row from table A all tables (B,C,D) with FK pointing to this
> table (A) must be scanned.

But in some applications you don't ever do that, so you don't save
anything by having the index for deletes but have to pay the cost to
update it when modifying the referencing table.

If you think an index will help in your case, just create one.

pgsql-performance by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: Why the planner is not using the INDEX .
Next
From: Stephan Szabo
Date:
Subject: Re: Why the planner is not using the INDEX .