Skip site navigation (1) Skip section navigation (2)

Re: constraint with reference to the same table

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Rudi Starcevic <rudi(at)oasis(dot)net(dot)au>
Cc: Postgres Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: constraint with reference to the same table
Date: 2003-05-15 00:46:47
Message-ID: 20030514174416.K52132-100000@megazone23.bigpanda.com (view raw or flat)
Thread:
Lists: 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.



In response to

Responses

pgsql-performance by date

Next:From: Stephan SzaboDate: 2003-05-15 00:49:42
Subject: Re: constraint with reference to the same table
Previous:From: Victor YegorovDate: 2003-05-15 00:12:39
Subject: Re: constraint with reference to the same table

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group