You are here: Re: Connection pool « PHP Programming Language « IT news, forums, messages
Re: Connection pool

Posted by Dikkie Dik on 06/09/06 18:26

I think it depends on the database library used. I read somewhere (but I
don't work with the combination PHP/SQL server myself) that the SQL
server library does not even have a means of more than one connection.

For MySQL, I guess you mean a "pconnect". Be aware that a MySQL session
is just like that: a session. You can connect to the server, even define
a few variables (which can come in very handy) and they exist in that
session only. If you were reusing that session, you could mess with
variables, settings or transactions set by another process.
Transactions can be a reason to open two connections from the same
script: you log errors in a table in one connection and still roll back
in another connection without loosing the error messages.

SQL server has another interpretation of "local": a local variable in
SQL server is only defined within one batch. So with SQL server,
connection pooling is less of a problem. On the contrary, SQL server is
a system where you pay for a number of concurrent connections. Just
opening another connection can be expensive in a financial sense. So it
is even designed for connection pooling.

Best regards

Ike wrote:
> Is anyone aware of a means of connection pooling (to MySQL, say) in php?
> Thanks, Ike
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация