|
Posted by Jerry Stuckle on 12/24/06 22:57
Jørn Dahl-Stamnes wrote:
> Jerry Stuckle wrote:
>
>
>>Jørn Dahl-Stamnes wrote:
>>
>>>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.
>
>
> "To pconnect or not to pconnect - that is the question.
>
> If the load on my web application is very low, connect is the best. And if
> the load increase I should choose pconnect instead. But how do I know when
> pconnect is best?
>
I don't have a solid rule - but I generally don't even start looking at
mysql_pconnect() until I'm seeing > 100 connects/sec.
It just takes too many resources from the system permanently otherwise.
You might speed up MySQL connections - but at the expense of something
else.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|