Re: constraint with reference to the same table - Mailing list pgsql-performance

From Stephan Szabo
Subject Re: constraint with reference to the same table
Date
Msg-id 20030514174416.K52132-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: constraint with reference to the same table  (Rudi Starcevic <rudi@oasis.net.au>)
Responses Re: constraint with reference to the same table  (Rudi Starcevic <rudi@oasis.net.au>)
List pgsql-performance
On Thu, 15 May 2003, Rudi Starcevic wrote:

> Can I confirm what this means then ..
>
> For large table's each column with ref. inegritry I should create an
> index on those columns ?

In general, yes.  There's always an additional cost with having additional
indexes to modifications to the table, so you need to balance the costs by
what sorts of queries you're doing.  For example, if you're doing a
references constraint to a table that is mostly there for say providing a
nice name for something and those values aren't likely to change (and it's
okay if a change were expensive) then you wouldn't necessarily want the
additional index.



pgsql-performance by date:

Previous
From: "Victor Yegorov"
Date:
Subject: Re: constraint with reference to the same table
Next
From: Rudi Starcevic
Date:
Subject: Re: constraint with reference to the same table