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 4898CD1B55E for ; Mon, 20 Oct 2003 19:03:16 +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 85548-01 for ; Mon, 20 Oct 2003 16:02:46 -0300 (ADT) Received: from davinci.ethosmedia.com (unknown [209.128.84.228]) by svr1.postgresql.org (Postfix) with ESMTP id 8955BD1B4E3 for ; Mon, 20 Oct 2003 16:02:44 -0300 (ADT) Received: from [66.219.92.2] (HELO temoku) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 3795992; Mon, 20 Oct 2003 12:03:25 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Joe Conway Subject: Re: Which is faster SQL or PL/PGSQL Date: Mon, 20 Oct 2003 12:00:31 -0700 User-Agent: KMail/1.4.3 Cc: pgsql-sql@postgresql.org References: <200310201124.02090.josh@agliodbs.com> <3F942F72.6050709@joeconway.com> In-Reply-To: <3F942F72.6050709@joeconway.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200310201200.31857.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/253 X-Sequence-Number: 15653 Joe, > Never tried it, but is it possible to use a prepared statement inside a= =20 > PL/pgSQL function? In any case, you can in other PLs. And with library=20 > preloading (starting in 7.4), the first call to other PLs is similar to= =20 > that of PL/pgSQL. See: > http://archives.postgresql.org/pgsql-patches/2003-07/msg00239.php Not sure how useful it would be in my case; I'm using EXECUTE because I'm= =20 building a dynamic query based on user input, so the query plans would need= =20 to vary radically from run to run. --=20 -Josh Berkus Aglio Database Solutions San Francisco