You are here: Re: About mysql_pconnect « PHP Programming Language « IT news, forums, messages
Re: About mysql_pconnect

Posted by Jerry Stuckle on 12/24/06 04:03

Jørn Dahl-Stamnes wrote:
> seaside wrote:
>
>
>>seaside schrieb:
>>
>>
>>>Jørn Dahl-Stamnes schrieb:
>>>
>>>
>>>>I then changed mysql_connect to mysql_pconnect on the scripts and
>>>>viola... the amount of new connections to the SQL server dropped to
>>>>only two.
>>
>>Additionally, this excerpt from
>>http://www.php.net/manual/en/features.persistent-connections.php may be
>>of interest for others, who read this thread:
>
>
> I have read it. I do not use any kind of locking on my SQL code. I assume
> that the only kind of locking I do is on record level when doing an UPDATE.
>

Not necessarily. For instance, a SELECT needs to get a lock to keep the
selected rows from being changed during the process. If you use a
MYISAM table, this is done by locking the entire table.

mysql_pconnect() is good when you have a lot of connections constantly
in use. But when you only have a couple of connections going at a time,
it's going to waste a lot of server resources.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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