Re: pg_pconnect - ?? - Mailing list pgsql-php

From Andrew McMillan
Subject Re: pg_pconnect - ??
Date
Msg-id 1012470472.4254.81.camel@kant.mcmillan.net.nz
Whole thread Raw
In response to Re: pg_pconnect - ??  (Frank Bax <fbax@sympatico.ca>)
Responses keyword search help  (arun kv <arun@library.iisc.ernet.in>)
List pgsql-php
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?


pgsql-php by date:

Previous
From: servis@arama.com
Date:
Subject: Arama.com da En Cok Aranan Kelimeler
Next
From: arun kv
Date:
Subject: keyword search help