Re: Weird Database Performance problem!

From: Richard Huxton <dev(at)archonet(dot)com>
To: Arash Zaryoun <Arash_Zaryoun(at)CBC(dot)CA>
Cc: Postgresql Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Weird Database Performance problem!
Date: 2004-08-13 19:23:52
Message-ID: 411D1548.20408@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Arash Zaryoun wrote:
> Hi Richard,
>
> Thanks for your prompt reply. It fixed the problem.
> Just one more question: Do I need to create an index for FKs?

You don't _need_ to, but on the referring side (e.g. table GCTBALLOT in
your example) PostgreSQL won't create one automatically.

Of course, the primary-key side will already have an index being used as
part of the constraint.

I've cc:ed the list on this, the question pops up quite commonly.

--
Richard Huxton
Archonet Ltd

Browse pgsql-performance by date

  From Date Subject
Next Message Merlin Moncure 2004-08-13 19:58:25 Re: fsync vs open_sync
Previous Message Tom Lane 2004-08-13 18:01:59 Re: insert