Re: [GENERAL] 7.4Beta

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Peter Childs <Blue(dot)Dragon(at)blueyonder(dot)co(dot)uk>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] 7.4Beta
Date: 2003-08-15 11:57:10
Message-ID: 12535.1060948630@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> writes:
> select * from fk where not exists(select * from pk where pk.key=fk.key)
> and key is not null;
> (doing seq scan/subplan doing index scan - which is probably close to the
> current system)

Actually, even that would probably be noticeably better than the current
system. I haven't profiled it (someone should) but I suspect that
executor startup/shutdown time is a huge hit. Even though the trigger
is caching a plan, it has to instantiate that plan for each referencing
tuple --- and the executor is not designed for quick startup/shutdown.

(Of course, this would become less relevant if the triggers got
rewritten to not go through SPI ...)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-08-15 12:07:08 Re: join of array
Previous Message Tom Lane 2003-08-15 11:51:54 ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Haller 2003-08-15 14:26:01 Copyright (C) 1996-2002
Previous Message Tom Lane 2003-08-15 11:51:54 ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)