From: | Bill Moran <wmoran(at)collaborativefusion(dot)com> |
---|---|
To: | Chris <dmagick(at)gmail(dot)com> |
Cc: | admin <mick(at)mjhall(dot)org>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: php + postgresql |
Date: | 2008-07-25 10:56:56 |
Message-ID: | 20080725065656.83e150ad.wmoran@collaborativefusion.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
In response to Chris <dmagick(at)gmail(dot)com>:
>
> > There does seem to be some evidence of problems historically with PHP
> > and persistent connections in PostgreSQL, on the PHP forums. The advice
> > is typically to avoid them.
>
> You'll find the same advice for mysql + persistent connections or any
> other db + persistent connections. It's not a php+postgres thing.
They're manageable if you know all the ins and outs. The big advantage
is speed, as they avoid the cost of establishing the initial TCP
connection and logging in. In my experiments, this cut the run time
for the average script in half.
But you have to deal with managing an overwhelming # of perpetually
open connections, which takes a lot of resources on both the server and
the client side, in addition to problems like connection settings persisting
from one script to the next.
My opinion is avoid them unless you have a demonstrated need for the
speed increase. In that case, make sure you have the time to understand
and code for all the potential issues.
--
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/
wmoran(at)collaborativefusion(dot)com
Phone: 412-422-3463x4023
****************************************************************
IMPORTANT: This message contains confidential information and is
intended only for the individual named. If the reader of this
message is not an intended recipient (or the individual
responsible for the delivery of this message to an intended
recipient), please be advised that any re-use, dissemination,
distribution or copying of this message is prohibited. Please
notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The
sender therefore does not accept liability for any errors or
omissions in the contents of this message, which arise as a
result of e-mail transmission.
****************************************************************
From | Date | Subject | |
---|---|---|---|
Next Message | Tino Wildenhain | 2008-07-25 12:31:09 | Re: php + postgresql |
Previous Message | Sam Mason | 2008-07-25 10:39:30 | Re: limit with subselect |