From: Konstantin Knizhnik [mailto:k.knizhnik@postgrespro.ru]
> PL/pgSQL: 29044.361 ms
> C/SPI: 22785.597 ms
>
> The fact that difference between PL/pgSQL and function implemented in C
> using SPI is not so large was expected by me.
This PL/pgSQL overhead is not so significant compared with the three times, but makes me desire some feature like
Oracle'sALTER PROCEDURE ... COMPILE; that compiles the PL/SQL logic to native code. I've seen a few dozen percent
speedup.
Regards
Takayuki Tsunakawa