pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Joshua D. Drake <jd@commandprompt.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: pl/pgSQL versus pl/Python
Date: Tue, 27 Jan 2004 16:56:18 -0800
Message-ID: <401708B2.7080201@joeconway.com> (raw)
In-Reply-To: <4016B365.4030405@commandprompt.com>
References: <4016B365.4030405@commandprompt.com>

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




view thread (2+ messages)

Message-ID: <401708B2.7080201@joeconway.com>
Permalink:  ../401708B2.7080201@joeconway.com/
Also on:    postgresql.org/message-id/401708B2.7080201@joeconway.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: mail@joeconway.com, jd@commandprompt.com
  Subject: Re: pl/pgSQL versus pl/Python
  In-Reply-To: <401708B2.7080201@joeconway.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox