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

From Victor Yegorov
Subject Re: constraint with reference to the same table
Date
Msg-id 20030515001239.GC1549@nordlb.lv
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
Re: constraint with reference to the same table
List pgsql-performance
* Rudi Starcevic <rudi@oasis.net.au> [15.05.2003 02:59]:
> Hi,
>
> Can I confirm what this means then ..
>
> For large table's each column with ref. inegritry I should create an
> index on those columns ?

I think, that indicies are needed only at delete stage to decrease search
time of possible referencing rows.
Not only, of course, but when we speak about
INSERT/UPDATE/DELETE data it is so.

On the other side, indicies increases total query runtime, because for
each row deleted/updated/inserted it'll be necessary to update each index.

In my case, I at first drop "cyclic" constraints, do the job and then
restore them.


--

Victor Yegorov

pgsql-performance by date:

Previous
From: Rudi Starcevic
Date:
Subject: Re: constraint with reference to the same table
Next
From: Stephan Szabo
Date:
Subject: Re: constraint with reference to the same table