Slow PL/pgSQL 8.0.RC5 (7.4.6. 3times faster) - Mailing list pgsql-hackers

From Pavel Stehule
Subject Slow PL/pgSQL 8.0.RC5 (7.4.6. 3times faster)
Date
Msg-id Pine.LNX.4.44.0501132123590.29441-100000@kix.fsv.cvut.cz
Whole thread Raw
Responses Re: Slow PL/pgSQL 8.0.RC5 (7.4.6. 3times faster)
List pgsql-hackers
Hello,
 I have small piece of code for testing speed of stored procedures. First 
time used its for compare mysql5 and postgresql. One year ago (feb.2004) 
was PostgreSQL much faster than mysql5. Now I was surprised. Mysql was 
faster. Mysql's developers did some work, but plpgsql is slowly than 
before :-(.

I used Linux, 2xP160, 256MB, with zero loading

PostgreSQL 7.4.6      needed  8896 ms
PostgreSQL 8.0.0. rc5 needed 24009 ms

I know so used SP is not clasic, only arithmetic operations, no sql code, 
but maybe it can signalize some problems..

CREATE OR REPLACE FUNCTION delitel(int, int) RETURNS int AS '
DECLARE a integer; b integer;
BEGIN a := $1; b := $2; WHILE a <> b LOOP   IF a > b THEN a := a - b; ELSE b := b - a; END IF; END LOOP; RETURN a;
END; ' LANGUAGE plpgsql;

Regards
Pavel Stehule



pgsql-hackers by date:

Previous
From: Palle Girgensohn
Date:
Subject: Bug? 8.0 does not use partial index
Next
From: Tom Lane
Date:
Subject: Re: some linker troubles with rc5 on sun studio 9 ...