X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 49DCDD1CCCC for ; Wed, 28 Jan 2004 01:00:45 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 47084-06 for ; Tue, 27 Jan 2004 21:00:15 -0400 (AST) Received: from joeconway.com (66-146-172-86.skyriver.net [66.146.172.86]) by svr1.postgresql.org (Postfix) with ESMTP id 736D2D1CCA6 for ; Tue, 27 Jan 2004 21:00:12 -0400 (AST) Received: from [206.19.64.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 791389; Tue, 27 Jan 2004 16:57:09 -0800 Message-ID: <401708B2.7080201@joeconway.com> Date: Tue, 27 Jan 2004 16:56:18 -0800 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Joshua D. Drake" Cc: pgsql-performance@postgresql.org Subject: Re: pl/pgSQL versus pl/Python References: <4016B365.4030405@commandprompt.com> In-Reply-To: <4016B365.4030405@commandprompt.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/288 X-Sequence-Number: 5462 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