At 05:32 PM 1/4/06, operationsengineer1@yahoo.com wrote:
>Frank, am i correct to infer that "In many cases where
>database and webserver are on the same box there is
>little time difference..." means that there can be
>more speed improvement when the web server and the db
>are on different hardware?
In some environments even that "little time difference" can be a big deal!!
To answer your question ... I don't know - I haven't any experience in that
environment; but I'm guessing that it's true. But there's also no free
lunch. It should also be pointed out that a persistent connection can only
be reused if all connect string parms are the same. If you use pg_users
for web authentication (as was mentioned earlier in this thread), then each
user will have their own pool of persistent connections. The number of
persistent connections could be (at least) = number of databases * number
of users * number of child processes. This can get to quite a large number
even in a small hosting environment with multiple databases. In my case, I
stopped using persistent connections the first time I hit the limit of max
connections within postgresql - my php scripts were crashing because there
was no available persistent connection in the current child process, and
backend was refusing to create any more connections.
So, as I said before, it's important to do your own tests to see what works
for you.