pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Y Sidhu <ysidhu@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Database connection for Tbl_B established
Date: Wed, 30 May 2007 18:32:11 -0400
Message-ID: <22202.1180564331@sss.pgh.pa.us> (raw)
In-Reply-To: <b09064f30705301445q13f2b608j2516c1e3eb4739bc@mail.gmail.com>
References: <b09064f30705301445q13f2b608j2516c1e3eb4739bc@mail.gmail.com>

"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



view thread (3+ messages)  latest in thread

Message-ID: <22202.1180564331@sss.pgh.pa.us>
Permalink:  ../22202.1180564331@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22202.1180564331@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ysidhu@gmail.com
  Subject: Re: Database connection for Tbl_B established
  In-Reply-To: <22202.1180564331@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox