Re: [PERFORM] Foreign key performance - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PERFORM] Foreign key performance
Date
Msg-id 23461.1050785882@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PERFORM] Foreign key performance  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: [PERFORM] Foreign key performance  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-hackers
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> The hack was just the keeping around the list pointer from the last run
> through (see attached - passed simple fk tests and regression, but there
> might be problems I don't see).

Shouldn't this patch update the comment in deferredTriggerInvokeEvents
(c. line 1860 in cvs tip)?

> Looking at the code, I also wonder if we
> would get some gain by not allocating the per_tuple_context at the
> beginning but only when a non-deferred constraint is found since otherwise
> we're creating and destroying the context and possibly never using it.

I doubt it's worth worrying over.  Creation/destruction of a never-used
memory context is pretty cheap, I think.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: [PERFORM] Foreign key performance
Next
From: You Lun
Date:
Subject: Priority queue of tuples in PostgreSQL source code.