Re: pl/pgSQL versus pl/Python - Mailing list pgsql-performance

From Joe Conway
Subject Re: pl/pgSQL versus pl/Python
Date
Msg-id 401708B2.7080201@joeconway.com
Whole thread Raw
In response to pl/pgSQL versus pl/Python  ("Joshua D. Drake" <jd@commandprompt.com>)
List 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


pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: (partial?) indexes, LIKE and NULL
Next
From: Shridhar Daithankar
Date:
Subject: Re: On the performance of views