Re: Deleting vs foreign keys

From: WireSpot <wirespot(at)gmail(dot)com>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Deleting vs foreign keys
Date: 2005-10-25 09:18:34
Message-ID: b2d4b0380510250218w758e7d21rcca840b8fa348ce0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/25/05, Michael Fuhr <mike(at)fuhr(dot)org> wrote:
> Are there indexes on the foreign key columns? That is, given
> the following example,
>
> CREATE TABLE foo (id integer PRIMARY KEY);
> CREATE TABLE bar (fooid integer NOT NULL REFERENCES foo ON DELETE CASCADE);
>
> do you have an index on bar.fooid?

There are no indexes on the referring fields in any tables. Would this
make a huge difference?

> Also, do you regularly vacuum and analyze the database?

Yes.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Elphick 2005-10-25 09:19:35 Re: pl/pgsql help
Previous Message Oliver Elphick 2005-10-25 09:15:17 Re: function DECODE and triggers