Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group