Hello,
with IMMUTABLE or STABLE function is only 7% slowly. It can be usefull add
into documentation so default flag is immutable, but if its not necessary
its recommended IMMUTABLE or STABLE flag.
Regards
Pavel Stehule
---(end of
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
Pavel Stehule [EMAIL PROTECTED] writes:
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;
And?
(ie,
Pavel Stehule [EMAIL PROTECTED] writes:
And?
(ie, what test case are you talking about?)
This test is function for searching max factor. It is speaking only about
quality of interpret an language. I would ask why?
So I can replicate your test.
regards, tom lane
And?
(ie, what test case are you talking about?)
regards, tom lane
This test is function for searching max factor. It is speaking only about
quality of interpret an language. I would ask why? If I need solve fast
this task I can write C function. What is reason
On Thu, Jan 13, 2005 at 05:05:00PM -0500, Tom Lane wrote:
Pavel Stehule [EMAIL PROTECTED] writes:
And?
(ie, what test case are you talking about?)
This test is function for searching max factor. It is speaking only about
quality of interpret an language. I would ask why?
So I can
I don't thing so differention on speed depends on compilation or other
options. I compile 8.0 and 7.4.6 from source today. I didn't use any
option for configure. But the difference is too big for optimalizations.
[EMAIL PROTECTED] root]# uname -a
Linux stehule.fsv.cvut.cz 2.6.4 #1 SMP Mon Mar
Michael Fuhr [EMAIL PROTECTED] writes:
SELECT delitel(100, 1);
Mean times over the last five of six runs on my poor 500MHz FreeBSD
4.11-PRERELEASE box:
6741 ms 7.4.6 (from FreeBSD ports collection)
14427 ms 8.0.0rc5 (from CVS source)
When I add IMMUTABLE to the function definition,
Michael Fuhr wrote:
On Thu, Jan 13, 2005 at 05:05:00PM -0500, Tom Lane wrote:
SELECT delitel(100, 1);
Mean times over the last five of six runs on my poor 500MHz FreeBSD
4.11-PRERELEASE box:
6741 ms 7.4.6 (from FreeBSD ports collection)
14427 ms 8.0.0rc5 (from CVS source)
Looks like
On Thu, Jan 13, 2005 at 06:25:10PM -0500, Tom Lane wrote:
Michael Fuhr [EMAIL PROTECTED] writes:
6741 ms 7.4.6 (from FreeBSD ports collection)
14427 ms 8.0.0rc5 (from CVS source)
When I add IMMUTABLE to the function definition, I get much closer
times.
Indeed -- adding IMMUTABLE
10 matches
Mail list logo