Re: Speed of different procedural language

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "Steinar H(dot) Gunderson" <sgunderson(at)bigfoot(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>, "Trewern, Ben" <Ben(dot)Trewern(at)mowlem(dot)com>
Subject: Re: Speed of different procedural language
Date: 2005-12-21 20:43:43
Message-ID: 6EE64EF3AB31D5448D0007DD34EEB3417DDBA8@Herge.rcsinc.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> On Sun, Dec 18, 2005 at 01:10:21AM -0000, Ben Trewern wrote:
> > I know I should be writing these in C but that's a bit beyond me. I
was
> > going to try PL/Python or PL/Perl or even PL/Ruby. Has anyone any
idea
> > which language is fastest, or is the data access going to swamp the
> overhead
> > of small functions?
>
> I'm not sure if it's what you ask for, but there _is_ a clear
difference
> between the procedural languages -- I've had a 10x speed increase from
> rewriting PL/PgSQL stuff into PL/Perl, for instance. I'm not sure
which
> ones
> would be faster, though -- I believe Ruby is slower than Perl or
Python
> generally, but I don't know how it all works out in a PL/* setting.

So far, I use plpgsql for everything...queries being first class and
all...I don't have any performance problems with it. I have cut the
occasional C routine, but for flexibility not for speed.

PL/Perl routines cannot directly execute each other, meaning you can't
pass high level objects between them like refcursors. YMMV

Since most database apps are bound by the server one way or another I
would imagine you should be choosing a language on reasons other than
performance.

Maybe Ben you could provide an example of what you are trying to do that
is not fast enough?

Merlin

Browse pgsql-performance by date

  From Date Subject
Next Message Michael Fuhr 2005-12-21 21:24:42 Re: Speed of different procedural language
Previous Message Tom Lane 2005-12-21 19:39:35 Re: ORDER BY costs