I read this as “Postgres functions are 9x faster in Citus” but it seems to actually be “Postgres functions in Citus 9 are 9x faster than in Citus 8” - because Citus 8 has round trips that standard PG doesn’t. Or did I miss something?
When I read this post, I find the HammerDB TPROC-C benchmark results in Figure 1 to be super interesting, too. When you compare Citus 9.4 performance with distributed tables and distributed functions vs. Citus 9.4 with regular Postgres tables and regular Postgres functions (on a single node) -- then the multiplier is an even more impressive ~19X. :)
In Citus 8, the coordinator node would run stored procedures. Citus 9.x introduced changes to push down stored procedures to worker nodes. So, if your stored procedures mostly touches local shards, Citus 9 significantly cuts down network traffic.