Slow PL/pgSQL 8.0.RC5 (7.4.6. 3times faster)

From: Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Slow PL/pgSQL 8.0.RC5 (7.4.6. 3times faster)
Date: 2005-01-13 20:37:46
Message-ID: Pine.LNX.4.44.0501132123590.29441-100000@kix.fsv.cvut.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-01-13 21:25:58 Re: some linker troubles with rc5 on sun studio 9 ...
Previous Message Brad Nicholson 2005-01-13 20:05:18 Port Report: Linux SuSE Enterprise Server 9 (x86_64)