Received: from localhost (uranus.hub.org [200.46.204.60]) by postgresql.org (Postfix) with ESMTP id 347889FB2BE for ; Thu, 9 Nov 2006 22:12:05 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.60]) (amavisd-new, port 10024) with ESMTP id 46626-03 for ; Thu, 9 Nov 2006 22:12:02 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from ipmail01.adl2.internode.on.net (ipmail01.adl2.internode.on.net [203.16.214.140]) by postgresql.org (Postfix) with ESMTP id 6E17D9FB2BD for ; Thu, 9 Nov 2006 22:12:02 -0400 (AST) Received: from ppp247-71.static.internode.on.net (HELO [192.168.8.200]) ([203.122.247.71]) by ipmail01.adl2.internode.on.net with ESMTP; 10 Nov 2006 12:40:01 +1030 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAIJuU0XLevdH/2dsb2JhbAANHg X-IronPort-AV: i="4.09,407,1157293800"; d="scan'208"; a="43882984:sNHT11839183923" Message-ID: <4553DF77.7030000@007Marketing.com> Date: Fri, 10 Nov 2006 12:39:59 +1030 From: Shane Ambler User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: Csaba Nagy CC: Hilary Forbes , postgres performance list Subject: Re: Keeping processes open for re-use References: <5.1.0.14.0.20061109123348.0418fbb8@mailserver.dmr.co.uk> <1163076964.2839.1.camel@coppola.muc.ecircle.de> In-Reply-To: <1163076964.2839.1.camel@coppola.muc.ecircle.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.542 tagged_above=0 required=5 tests=AWL, BAYES_20, BIZ_TLD X-Spam-Level: X-Archive-Number: 200611/90 X-Sequence-Number: 21860 Csaba Nagy wrote: > On Thu, 2006-11-09 at 13:35, Hilary Forbes wrote: >> [snip] Is there a way that we can achieve this in Postgres? We have a >> situation whereby we have lots of web based users doing short quick >> queries and obviously the start up time for a process must add to >> their perceived response time. > > Yes: google for "connection pooling". Note that different solutions > exist for different programming languages, so you should look for > connection pooling for the language you're using. > If you are using PHP then persistent connections may be a simpler way if it is enough for your needs. Basically replace pg_connect with pg_pconnect Other languages may have a similar option. http://php.net/manual/en/features.persistent-connections.php -- Shane Ambler pgSQL@007Marketing.com Get Sheeky @ http://Sheeky.Biz