Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] Re: PHP and PostgreSQL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tom Samplonius <tom(at)sdf(dot)com>
Cc: mlw <markw(at)mohawksoft(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, PostgreSQL-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: [INTERFACES] Re: PHP and PostgreSQL
Date: 2001-01-03 06:07:16
Message-ID: 15332.978502036@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces
Tom Samplonius <tom(at)sdf(dot)com> writes:
> ... Besides, as already has been tested, session startup time is
> minimal.

Well, mumble ...

I think the startup time is negligible if you are issuing a reasonable
number of queries per session (say a few dozen).  But if you connect,
issue one query, and disconnect, then undoubtedly you will find that
performance sucks.

We could probably do more to improve this situation on the server side,
but IMHO it makes most sense to address the issue on the client side
via connection reuse.  The main reason for this is that a significant
amount of the startup time for a standard connection consists of
authentication overhead and context setup overhead (such as setting the
timezone and character set encoding that the client wants to use).
A general-purpose connection-reuse facility on the server end cannot
eliminate these overheads, whereas it's trivial to avoid them within
the context of a multi-threaded client.

Bottom line: better to solve it by fixing Apache or PHP.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2001-01-03 07:14:15
Subject: Please review TODO list
Previous:From: Tom SamploniusDate: 2001-01-03 04:32:03
Subject: Re: [INTERFACES] Re: PHP and PostgreSQL

pgsql-interfaces by date

Next:From: Andrea AimeDate: 2001-01-03 10:14:43
Subject: Updated ODBC driver: where?
Previous:From: Tom SamploniusDate: 2001-01-03 04:32:03
Subject: Re: [INTERFACES] Re: PHP and PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group