Re: Storage of Foreign Keys

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Storage of Foreign Keys
Date: 2009-09-21 17:09:40
Message-ID: 200909211009.40811@hal.medialogik.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday 21 September 2009, Christian Koetschan
<c(dot)koetschan(at)biozentrum(dot)uni-wuerzburg(dot)de> wrote:
> Is everything I insert into mycolA and mycolB stored twice, or
> is there something like a pointer/reference from mycolA to the things
> stored in mycolB?
>

It's stored twice and for performance you need to index it in both tables.
If you put ON UPDATE CASCADE on it, an update to the master will hit both
tables though.

--
"No animals were harmed in the recording of this episode. We tried but that
damn monkey was just too fast."

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Duffey 2009-09-21 17:09:58 VMWare file system / database corruption
Previous Message Tguru 2009-09-21 13:26:59 Re: anyone have experience with using Talend ETL tool