Re: C trigger significantly slower than PL/pgSQL? - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: C trigger significantly slower than PL/pgSQL?
Date
Msg-id 826406.1681301955@sss.pgh.pa.us
Whole thread Raw
In response to Re: C trigger significantly slower than PL/pgSQL?  (Dave Cramer <davecramer@postgres.rocks>)
List pgsql-interfaces
Dave Cramer <davecramer@postgres.rocks> writes:
> Fair. So to answer your question. The C function should be faster.

If we exclude basic coding errors (i.e. not really "equivalent"
processing) then a possible theory is that plpgsql is being careful
to cache a query plan that your C code is causing to be recomputed
each time.  But yeah, all else being equal plpgsql should be slower.

            regards, tom lane



pgsql-interfaces by date:

Previous
From: Dave Cramer
Date:
Subject: Re: C trigger significantly slower than PL/pgSQL?
Next
From: pgchem pgchem
Date:
Subject: Re: C trigger significantly slower than PL/pgSQL?