Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 5DAC29FB828 for ; Wed, 30 May 2007 20:36:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 96105-05 for ; Wed, 30 May 2007 20:36:53 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.243]) by postgresql.org (Postfix) with ESMTP id EC2F69FBB19 for ; Wed, 30 May 2007 20:36:51 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so766444ana for ; Wed, 30 May 2007 16:36:50 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=KhdDpuQ+gEfwag+UWv7CUjiCi7atX/nno++FDBbjI+9wEDl0is89GDyuhKJ1IF0KvrEsBTG/OtKxnS758QO/0ulcm997R+64sZVbgbhOyUpGyDa4bqWVVidJdNlIJWKkxYi+CwzojfWJX4CDGK1j6t27NKgkcUoVZ9GqADC7O5I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=f71lEW4Z49IUAMq0mNwSyTMx6LJNuS9uSThBSNYU1ZP1iWhODc3T7mKrcHDZJVDwP4dIp1xHthJeRJ4ASR++iowrF3hmyRYJ/hePCMhIUV2knb8tZiehCIcFus+1sDGqnwibWpO8vNYgCBPJLkM+D1hAOntB3nuu14oWoOUCjv0= Received: by 10.100.216.3 with SMTP id o3mr6404386ang.1180568210529; Wed, 30 May 2007 16:36:50 -0700 (PDT) Received: by 10.100.143.13 with HTTP; Wed, 30 May 2007 16:36:50 -0700 (PDT) Message-ID: Date: Wed, 30 May 2007 16:36:50 -0700 From: "Y Sidhu" To: "Tom Lane" Subject: Re: Database connection for Tbl_B established Cc: pgsql-performance@postgresql.org In-Reply-To: <22202.1180564331@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_17244_14292874.1180568210478" References: <22202.1180564331@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/632 X-Sequence-Number: 25022 ------=_Part_17244_14292874.1180568210478 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline You are referring to pgpool? BTW, thanks for this insight. Yudhvir ======== On 5/30/07, Tom Lane wrote: > > "Y Sidhu" writes: > > The question is: Is this method of repeatedly establishing and > > re-establishing database connections with the same 3 tables efficient? > > No. Launching a new backend process is a fairly expensive proposition; > if you're striving for performance you don't want to do it for just one > or two queries. Look into connection pooling ... > > regards, tom lane > -- Yudhvir Singh Sidhu 408 375 3134 cell ------=_Part_17244_14292874.1180568210478 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline You are referring to pgpool? BTW, thanks for this insight.

Yudhvir
========

On 5/30/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Y Sidhu" <ysidhu@gmail.com> writes:
> The question is:  Is this method of repeatedly establishing and
> re-establishing database connections with the same 3 tables efficient?

No.  Launching a new backend process is a fairly expensive proposition;
if you're striving for performance you don't want to do it for just one
or two queries.  Look into connection pooling ...

                        regards, tom lane



--
Yudhvir Singh Sidhu
408 375 3134 cell ------=_Part_17244_14292874.1180568210478--