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