Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 4BDF79FBF23 for ; Wed, 30 May 2007 19:32:20 -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 68570-01 for ; Wed, 30 May 2007 19:32:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 774659FB8E0 for ; Wed, 30 May 2007 19:32:17 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l4UMWB5R022203; Wed, 30 May 2007 18:32:11 -0400 (EDT) To: "Y Sidhu" cc: pgsql-performance@postgresql.org Subject: Re: Database connection for Tbl_B established In-reply-to: References: Comments: In-reply-to "Y Sidhu" message dated "Wed, 30 May 2007 14:45:07 -0700" Date: Wed, 30 May 2007 18:32:11 -0400 Message-ID: <22202.1180564331@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/631 X-Sequence-Number: 25021 "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