You are here: Re: One Global Connection vs. Open-Close « PHP Programming Language « IT news, forums, messages
Re: One Global Connection vs. Open-Close

Posted by Vince Morgan on 04/29/07 13:32

"john" <puopolo@gmail.com> wrote in message
news:1177851382.764835.310600@y80g2000hsf.googlegroups.com...
> All:
>
> I have a MS background and am having fun in the open source world of
> PHP and MySQL --- and I have a question.
>
> With PHP and MySQL, is it considered better practice to open a single
> database connection and re-use it throughout the life of the
> application (simple Web application - low traffic), or is it better to
> open a connection, use it and close it as needed?
>
> (With SQL Server, you'd do the latter, because connection pooling and
> other optimization mechanisms help ensure that connecting to the
> database is low cost.)
>
The latter is actualy very fast in php too. Surprisingly so.
Vince

 

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

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