From: Richard Huxton <dev@archonet.com>
To: Arash Zaryoun <Arash_Zaryoun@CBC.CA>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: Weird Database Performance problem!
Date: Fri, 13 Aug 2004 20:23:52 +0100
Message-ID: <411D1548.20408@archonet.com> (raw)
In-Reply-To: <s11cc6f4.012@cbc.ca>
References: <s11cc6f4.012@cbc.ca>
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
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: dev@archonet.com, Arash_Zaryoun@CBC.CA
Subject: Re: Weird Database Performance problem!
In-Reply-To: <411D1548.20408@archonet.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