Re: php + postgresql

Поиск
Список
Период
Сортировка
От Bill Moran
Тема Re: php + postgresql
Дата
Msg-id 20080725065656.83e150ad.wmoran@collaborativefusion.com
обсуждение исходный текст
Ответ на Re: php + postgresql  (Chris <dmagick@gmail.com>)
Список pgsql-general
In response to Chris <dmagick@gmail.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@collaborativefusion.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.
****************************************************************

В списке pgsql-general по дате отправления:

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: limit with subselect
Следующее
От: Tino Wildenhain
Дата:
Сообщение: Re: php + postgresql