Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id E7543633C1A for ; Wed, 13 May 2009 12:21:44 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 81232-07 for ; Wed, 13 May 2009 12:21:43 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.28]) by mail.postgresql.org (Postfix) with ESMTP id 7C2486334A4 for ; Wed, 13 May 2009 12:21:43 -0300 (ADT) Received: by yx-out-2324.google.com with SMTP id 8so363514yxg.73 for ; Wed, 13 May 2009 08:21:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=hfT2v99QNTFvtBhOzu8Tax3pd0+FMADw478/i/uNuRw=; b=LLs5dtnTObE72x6i2jBbsGNZB418mffgt13BsooxJ2KPFm7gNt/wTK7S8tpFLmdkOp j1L0gMdYxkTv8vfpUXN/yJB3nZZtzG7oOkf8T+8Ydzi6siNijZfWAhuldZXfMxZL23Vl /p2koyVVp3Y3UbkQhmaEvTSkcbmPX1srAuHfI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=SEyacRA5xZdbtAFpjjgLHMuatPurOVFo33Cjk65zZoghJ5KlImIhgZTVVxWhGskr6W +2kGiOBZIFX7magQZUJc2P+Md4X045QeKPmd4M9uo9HNriaWaxExfCwCo/Mu27oCjA2l JZVAyI9U/MBoDaDj6rXHO8Z/O4+vfRcmRaiwU= MIME-Version: 1.0 Received: by 10.90.92.16 with SMTP id p16mr21434agb.56.1242228102833; Wed, 13 May 2009 08:21:42 -0700 (PDT) In-Reply-To: <03C41048CEFD45DD97AC0DD884C8A21A@squarepi.com> References: <4A0978A3.6030900@fcon.no> <4A099C8F.60709@kickstone.com> <4A09C4E6.3010408@fcon.no> <4A09D04B.9070206@kickstone.com> <4A0A7D50.40704@fcon.no> <03C41048CEFD45DD97AC0DD884C8A21A@squarepi.com> Date: Wed, 13 May 2009 11:21:42 -0400 X-Google-Sender-Auth: 3027b1042b44b18e Message-ID: <491f66a50905130821j6afa056fp947e4dbcfd09d701@mail.gmail.com> Subject: Re: pooled prepared statements From: Dave Cramer To: John Lister Cc: Thomas Finneid , pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary=0016361e7d94cca8330469ccc4c0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.085 tagged_above=0 required=5 tests=AWL=0.084, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200905/75 X-Sequence-Number: 19625 --0016361e7d94cca8330469ccc4c0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Wed, May 13, 2009 at 10:37 AM, John Lister wrote: > Probably easier to create a server side function instead, then. >>>> >>> But wouldn't you still have to go through all the planning steps within >>> the function for any queries, although i'll admit i'm not familiar with >>> Postgresql functions. >>> >> >> Server-side functions are compiled when installed. Since my function would >> only contain simple queries that are parameterized, it would pre-compile >> well. >> > While the function may be compiled, the overhead is the same for preparing the statement inside the function. So I don't think it's a huge win. --0016361e7d94cca8330469ccc4c0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Wed, May 13, 2009 at 10:37 AM, John L= ister <jo= hn.lister@kickstone.com> wrote:
Probably easier to create a server side function instead, then.
But wouldn't you still have to go through all the planning steps within= the function for any queries, although i'll admit i'm not familiar= with Postgresql functions.

Server-side functions are compiled when installed. Since my function would = only contain simple queries that are parameterized, it would pre-compile we= ll.

While the function may be compiled, the overhea= d is the same for preparing the statement inside the function. So I don'= ;t think it's a huge win.

--0016361e7d94cca8330469ccc4c0--