Re: C trigger significantly slower than PL/pgSQL?

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: C trigger significantly slower than PL/pgSQL?
Дата
Msg-id CADK3HHJ0HtYy=6ErV69v9Emj2VsEkpJwvvcE-Rx9n1sDAAGrfw@mail.gmail.com
обсуждение исходный текст
Ответ на C trigger significantly slower than PL/pgSQL?  (pgchem pgchem <pgchem@tuschehund.de>)
Ответы Re: C trigger significantly slower than PL/pgSQL?
Список pgsql-interfaces


On Wed, 12 Apr 2023 at 06:14, pgchem pgchem <pgchem@tuschehund.de> 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
 

В списке pgsql-interfaces по дате отправления:

Предыдущее
От: pgchem pgchem
Дата:
Сообщение: C trigger significantly slower than PL/pgSQL?
Следующее
От: pgchem pgchem
Дата:
Сообщение: Re: C trigger significantly slower than PL/pgSQL?