Re: [HACKERS] plpgsql function is so slow

2009-09-25 Thread Merlin Moncure
On Fri, Sep 25, 2009 at 1:05 AM, Andrew Gierth and...@tao11.riddles.org.uk wrote: Euler == Euler Taveira de Oliveira eu...@timbira.com writes:  Euler Ops... forgot to remove it from other test. It seems much  Euler better but far from the ideal. :( I've never taken a look at  Euler the

[HACKERS] plpgsql function is so slow

2009-09-24 Thread Euler Taveira de Oliveira
Hi, I recently saw a complaint that a simple PL/PgSQL code is slower than PL/SQL. I did some benchmark and confirmed it is. I coded the same function (function2) in C just to compare with something. According to OP [1], the PL/SQL seems to run more than 15x faster than PL/PgSQL code. euler=#

Re: [HACKERS] plpgsql function is so slow

2009-09-24 Thread Tom Lane
Euler Taveira de Oliveira eu...@timbira.com writes: I recently saw a complaint that a simple PL/PgSQL code is slower than PL/SQL. I did some benchmark and confirmed it is. I coded the same function (function2) in C just to compare with something. According to OP [1], the PL/SQL seems to run

Re: [HACKERS] plpgsql function is so slow

2009-09-24 Thread Euler Taveira de Oliveira
Tom Lane escreveu: FWIW, the high showing of AllocSetReset in your profile suggests to me that you're timing an assert-enabled build, which wouldn't exactly be a fair comparison to an Oracle production build anyhow. Ops... forgot to remove it from other test. It seems much better but far from

Re: [HACKERS] plpgsql function is so slow

2009-09-24 Thread Pavel Stehule
2009/9/24 Euler Taveira de Oliveira eu...@timbira.com: Hi, I recently saw a complaint that a simple PL/PgSQL code is slower than PL/SQL. I did some benchmark and confirmed it is. I coded the same function (function2) in C just to compare with something. According to OP [1], the PL/SQL seems

Re: [HACKERS] plpgsql function is so slow

2009-09-24 Thread Andrew Gierth
Euler == Euler Taveira de Oliveira eu...@timbira.com writes: Euler Ops... forgot to remove it from other test. It seems much Euler better but far from the ideal. :( I've never taken a look at Euler the pl/pgsql code but it could be nice if there would be two Euler path codes: access-data and