Re: Storage of Foreign Keys
От | Scott Marlowe |
---|---|
Тема | Re: Storage of Foreign Keys |
Дата | |
Msg-id | dcc563d10909211044s659191dcuc49abf4d166dae43@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Storage of Foreign Keys (Alan Hodgson <ahodgson@simkin.ca>) |
Ответы |
Re: Storage of Foreign Keys
|
Список | pgsql-general |
On Mon, Sep 21, 2009 at 11:09 AM, Alan Hodgson <ahodgson@simkin.ca> wrote: > On Monday 21 September 2009, Christian Koetschan > <c.koetschan@biozentrum.uni-wuerzburg.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. Slight correction. You might need to index it on both ends for performance. There are some instances where the referencing table only ever has a few rows in it, and in those cases, you likely don't need an index.
В списке pgsql-general по дате отправления: