Re: ON UPDATE CASCADE overhead? - Mailing list pgsql-sql

From Jan Wieck
Subject Re: ON UPDATE CASCADE overhead?
Date
Msg-id 200105181337.JAA01649@jupiter.jw.home
Whole thread Raw
In response to ON UPDATE CASCADE overhead?  (Forest Wilkinson <fspam@home.com>)
List pgsql-sql
Forest Wilkinson wrote:
> If I add ON UPDATE CASCADE to my foreign key definitions, how much will it
> affect performance for queries that don't trigger the cascade?
   The  trigger  fired  on  the PK table does a check if the key   fields changed first. Therefore, at the first time
offireing   for  this  action  during  backend  lifetime  it'll  do  some   syscache lookups and remember the
comparision functions  to   call  for this check. From then on it'll call the comparision   functions directly and
returnimmediately without  doing  any   real work if the key effectively didn't change.
 
   I  expect it to not affect the performance significant. Would   be nice though if you'd run some tests and share the
results   with us.
 


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



pgsql-sql by date:

Previous
From: "Ligia Pimentel"
Date:
Subject: Re: fatal ERROR running simple join query...
Next
From: bboett@erm1.u-strasbg.fr (Bruno Boettcher)
Date:
Subject: HELP: what's wrong with my PL/PSQL function??