andy <andy@squeakycode.net> writes:
> On 10/22/2013 2:18 PM, John R Pierce wrote:
>> that style of php programming, you're getting some HUGE overhead in
>> connect/disconnect per web page. putting pg_bouncer in the middle
>> will make a HUGE improvement, possibly a second per page load on a busy
>> server.
> No, actually, I don't think my connect overhead is huge. My apache and
> postgres are on the same box, and it connects using unix socket.
You're ignoring the fact that PG backends have a pretty considerable
startup transient. By the time a backend has gotten its caches populated
enough to be efficient, it's expended a lot of cycles. You might be
getting away with this approach under low load, but it will bite you in
painful places eventually.
regards, tom lane