Re: pl/pgSQL versus pl/Python

From: Joe Conway <mail(at)joeconway(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: pl/pgSQL versus pl/Python
Date: 2004-01-28 00:56:18
Message-ID: 401708B2.7080201@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Joshua D. Drake wrote:
> With the new preload option is there any benefit/drawback to using
> pl/Python versus pl/pgSQL?

If you're asking about relative speed, I did some *very* simple tests
and posted them here:

http://archives.postgresql.org/pgsql-patches/2003-07/msg00239.php

without preload:
=====================================================================
regression=# explain analyze select echo_plperl('hello');
Total runtime: 55.29 msec
regression=# explain analyze select echo_pltcl('hello');
Total runtime: 23.34 msec
regression=# explain analyze select echo_plpythonu('hello');
Total runtime: 32.40 msec
regression=# explain analyze select echo_plpgsql('hello');
Total runtime: 3.09 msec

with preload:
=====================================================================
regression=# explain analyze select echo_plperl('hello');
Total runtime: 5.14 msec
regression=# explain analyze select echo_pltcl('hello');
Total runtime: 7.64 msec
regression=# explain analyze select echo_plpythonu('hello');
Total runtime: 1.91 msec
regression=# explain analyze select echo_plpgsql('hello');
Total runtime: 1.35 msec

This was intended to just measure the time to execute a simple "hello
world" type of function, for the first time in a given session. I did
not repeat/average the results though, so you might want to do some of
your own testing.

Joe

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Shridhar Daithankar 2004-01-28 08:43:55 Re: On the performance of views
Previous Message Tom Lane 2004-01-27 22:46:38 Re: (partial?) indexes, LIKE and NULL