Re: pg_pconnect - ??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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?



[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux