X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 3F17BD1B4F2 for ; Mon, 20 Oct 2003 15:33:55 +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 47910-03 for ; Mon, 20 Oct 2003 12:33:23 -0300 (ADT) Received: from server1.techplant.com (unknown [209.61.173.33]) by svr1.postgresql.org (Postfix) with ESMTP id E1203D1B4EC for ; Mon, 20 Oct 2003 12:33:22 -0300 (ADT) Received: from localhost (michael@localhost) by server1.techplant.com (8.11.6/8.11.6) with ESMTP id h9KFaON07445 for ; Mon, 20 Oct 2003 11:36:24 -0400 Date: Mon, 20 Oct 2003 11:36:24 -0400 (EDT) From: Michael Pohl X-X-Sender: michael@server1.techplant.com To: pgsql-sql@postgresql.org Subject: Re: Which is faster SQL or PL/PGSQL In-Reply-To: Message-ID: X-Mailkey: j9dfjk23j4dkq MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/238 X-Sequence-Number: 15638 On Sun, 19 Oct 2003, Christopher Browne wrote: > The world rejoiced as jinujosein@yahoo.com ("George A.J") wrote: > > i am converting an MSSQL database to Postgres. there is a lot of > > procedures to convert. > > > > which language is best for functions, SQL or plpgsql. > > > > which is faster . i am using postgres 7.3.2 > > Hmm? This doesn't seem to make much more sense than the question of > what colour a database should be ("Mauve has more RAM..."). Transact-SQL stored procedures pseudo-compile their execution plans the first time they are run, which can result in faster subsequent executions. I'm guessing the poster was wondering if plpgsql functions offered similar performance benefits vs. equivalent SQL. michael