Re: Re: PHP and PostgreSQL - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: Re: PHP and PostgreSQL
Date
Msg-id 15332.978502036@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: PHP and PostgreSQL  (Tom Samplonius <tom@sdf.com>)
List pgsql-interfaces
Tom Samplonius <tom@sdf.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


pgsql-interfaces by date:

Previous
From: Tom Samplonius
Date:
Subject: Re: Re: PHP and PostgreSQL
Next
From: "Andrea Aime"
Date:
Subject: Updated ODBC driver: where?