Hello
it isn't surprise. PL/pgSQL hasn't own arithmetic unit. All
expressions are transformed to simple SELECTs.
Probably you can find a tasks, where Perl should be 10, 100, 1000x
faster than PL/pgSQL - array sort, array creation, ..
On second hand, PL/pgSQL is very fast with embeded SQL.
So if
Hi.
I do small test of plsql and perl.Result is that perl may be
2xfaster in simple loops.
CREATE OR REPLACE FUNCTION _.test1() RETURNS void AS
$BODY$
declare i integer; j bigint := 0;
begin
for i in 1..100 loop j:=j+i; end loop;
end;
$BODY$ LANGUAGE plpgsql VOLATILE COST 100;
"Result