Re: Effects of cascading references in foreign keys

От: Bruce Momjian
Тема: Re: Effects of cascading references in foreign keys
Дата: ,
Msg-id: 200608220350.k7M3o2s14894@momjian.us
(см: обсуждение, исходный текст)
Ответ на: Re: Effects of cascading references in foreign keys  (Tom Lane)
Список: pgsql-performance

Скрыть дерево обсуждения

Effects of cascading references in foreign keys  (Martin Lesser, )
 Re: Effects of cascading references in foreign keys  (Michael Fuhr, )
  Re: Effects of cascading references in foreign keys  (Bruno Wolff III, )
   Re: Effects of cascading references in foreign keys  (Michael Fuhr, )
    Re: Effects of cascading references in foreign keys  (Bruce Momjian, )
    Re: Effects of cascading references in foreign keys  (Tom Lane, )
     Re: Effects of cascading references in foreign keys  (Tom Lane, )
      Re: Effects of cascading references in foreign keys  (Bruce Momjian, )
      Re: Effects of cascading references in foreign keys  (Bruce Momjian, )
      Re: Effects of cascading references in foreign keys  (Bruce Momjian, )
     Re: Effects of cascading references in foreign keys  (Bruce Momjian, )
     Re: Effects of cascading references in foreign keys  (Bruce Momjian, )
 Re: Effects of cascading references in foreign keys  (Bruno Wolff III, )
  Re: Effects of cascading references in foreign keys  (Bruce Momjian, )
  Re: Effects of cascading references in foreign keys  ("Thomas F. O'Connell", )
   Re: Effects of cascading references in foreign keys  (Bruce Momjian, )
    Re: Effects of cascading references in foreign keys  (Martin Lesser, )

Tom Lane wrote:
> I wrote:
> > Looking at this, I wonder if there isn't a bug or at least an
> > inefficiency in 8.1.  The KeysEqual short circuit tests are still there
> > in ri_triggers.c; aren't they now redundant with the test in triggers.c?
> > And don't they need to account for the special case mentioned in the
> > comment in triggers.c, that the RI check must still be done if we are
> > looking at a row updated by the same transaction that created it?
>
> OK, I take back the possible-bug comment: the special case only applies
> to the FK-side triggers, which is to say RI_FKey_check, and that routine
> doesn't attempt to skip the check on equal old/new keys.  I'm still
> wondering though if the KeysEqual tests in the other RI triggers aren't
> now a waste of cycles.

Would someone please research this?  Thanks.

--
  Bruce Momjian   
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-performance по дате сообщения:

От: "Dan Langille"
Дата:
Сообщение: Forcing index usage without 'enable_hashjoin = FALSE'
От: Michael Stone
Дата:
Сообщение: Re: Storage Options