pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew McMillan <andrew@catalyst.net.nz>
To: Frank Bax <fbax@sympatico.ca>
Cc: Chris Ruprecht <chrup999@yahoo.com>
Cc: PostGreSQL PHP Group <pgsql-php@postgresql.org>
Subject: Re: pg_pconnect - ??
Date: 31 Jan 2002 22:47:51 +1300
Message-ID: <1012470472.4254.81.camel@kant.mcmillan.net.nz> (raw)
In-Reply-To: <3.0.6.32.20020128141957.02130660@pop6.sympatico.ca>
References: <3.0.6.32.20020128141957.02130660@pop6.sympatico.ca>

On Tue, 2002-01-29 at 08:19, Frank Bax wrote:
> 
> If your postgres database is on the same server as you webserver, there is
> neglible gains for using pconnect over connect.

I see much larger improvements than that, in the real world, with my
applications which are all running database and webserver on the same
system.

In my applications I use a wrapper for the query process which logs the
query time (amongst other things), and pg_pconnect gives substantial
improvements in regular query performance over pg_connect.

I believe what is happening is that the PostgreSQL client is in some
part caching query plans, metadata and data so that queries execute
faster. For minimal queries the performance gain seems to be as much as
10 times (i.e. the pconnect query frequently runs in 1/10th of the time
of the normal connect).

Obviously these speed improvements also depend on your application's
patterns of data access, but I have not found an application that
doesn't show significant improvement.

I have also found the same order of improvement to be made by using
DBBalancer to pool the database connections.

Regards,
					Andrew.
-- 
--------------------------------------------------------------------
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/        PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201    MOB: +64(21)635-694    OFFICE: +64(4)499-2267
       Are you enrolled at http://schoolreunions.co.nz/ yet?




view thread (26+ messages)  latest in thread

Message-ID: <1012470472.4254.81.camel@kant.mcmillan.net.nz>
Permalink:  ../1012470472.4254.81.camel@kant.mcmillan.net.nz/
Also on:    postgresql.org/message-id/1012470472.4254.81.camel@kant.mcmillan.net.nz

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: andrew@catalyst.net.nz, fbax@sympatico.ca, chrup999@yahoo.com
  Subject: Re: pg_pconnect - ??
  In-Reply-To: <1012470472.4254.81.camel@kant.mcmillan.net.nz>
  References: <3.0.6.32.20020128141957.02130660@pop6.sympatico.ca> <1012470472.4254.81.camel@kant.mcmillan.net.nz>

* 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