Re: insert

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: insert
Дата
Msg-id 20040813163134.GA3743@wolff.to
обсуждение исходный текст
Ответ на Re: insert  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-performance
On Fri, Aug 13, 2004 at 17:17:10 +0100,
  Matt Clark <matt@ymogen.net> wrote:
> > > It is likely that you are missing an index on one of those foreign
> > > key'd items.
> >
> > I don't think that is too likely as a foreign key reference
> > must be a unique key which would have an index.
>
> I think you must be thinking of primary keys, not foreign keys.  All
> one-to-many relationships have non-unique foreign keys.

The target of the reference needs to have at least a unique index.
I am not sure if it needs to actually be declared as either a unique
or primary key, though that is the intention.

The records doing the referencing don't need (and normally aren't)
unique.

В списке pgsql-performance по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Weird Database Performance problem!
Следующее
От: "Matt Clark"
Дата:
Сообщение: Re: insert