public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dave Cramer <[email protected]>
To: pgchem pgchem <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: C trigger significantly slower than PL/pgSQL?
Date: Wed, 12 Apr 2023 07:05:14 -0400
Message-ID: <CADK3HHJ0HtYy=6ErV69v9Emj2VsEkpJwvvcE-Rx9n1sDAAGrfw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
On Wed, 12 Apr 2023 at 06:14, pgchem pgchem <[email protected]> wrote:
> Hello all,
>
> I have a functionally identical trigger function in PL/pgSQL and C. Now,
> that the C version is about 3x _slower_ (~1500 vs. ~4500 TPS in pgbench)
> than PL/pgSQL comes somewhat unexpected.
>
> It can very well be, that I made a mistake on the C side, but before
> everything else, I'd like to ask if this may be expected behavior. Is it
> plausible that PL/pgSQL is so much faster than C when used in a trigger
> function?
>
It would be infinitely easier to answer this question if you posted both
functions and the plans
Dave Cramer
www.postgres.rocks
> best regards
>
> Ernst-Georg
>
>
view thread (9+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: C trigger significantly slower than PL/pgSQL?
In-Reply-To: <CADK3HHJ0HtYy=6ErV69v9Emj2VsEkpJwvvcE-Rx9n1sDAAGrfw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox