From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Dave Cramer <davecramer(at)postgres(dot)rocks> |
Cc: | pgchem pgchem <pgchem(at)tuschehund(dot)de>, "pgsql-interfaces(at)postgresql(dot)org" <pgsql-interfaces(at)postgresql(dot)org> |
Subject: | Re: C trigger significantly slower than PL/pgSQL? |
Date: | 2023-04-12 12:19:15 |
Message-ID: | 826406.1681301955@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
Dave Cramer <davecramer(at)postgres(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | pgchem pgchem | 2023-04-13 09:31:27 | Re: C trigger significantly slower than PL/pgSQL? |
Previous Message | Dave Cramer | 2023-04-12 12:03:41 | Re: C trigger significantly slower than PL/pgSQL? |