Re: Effects of cascading references in foreign keys

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Effects of cascading references in foreign keys
Дата
Msg-id 20051029144947.GB21068@wolff.to
обсуждение исходный текст
Ответ на Re: Effects of cascading references in foreign keys  (Michael Fuhr <mike@fuhr.org>)
Ответы Re: Effects of cascading references in foreign keys  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-performance
On Sat, Oct 29, 2005 at 08:24:32 -0600,
  Michael Fuhr <mike@fuhr.org> wrote:
> > Does an UPDATE of e.g. m_fld1 in t_master cause a 'lookup' in all tables
> > which have a cascading update-rule or is this 'lookup' only triggered if
> > the referenced column in t_master is explicitly updated?
>
> My tests suggest that a lookup on the referring key is done only
> if the referenced key is changed.  Here's an example from 8.1beta4;
> I used this version because EXPLAIN ANALYZE shows triggers and the
> time spent in them, but I see similar performance characteristics
> in earlier versions.  I've intentionally not put an index on the
> referring column to make lookups on it slow.

It looks like this feature was added last May, so I think it only applies
to 8.1.

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Effects of cascading references in foreign keys
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Effects of cascading references in foreign keys