At 10:02 AM +0300 7/17/99, Tõnu Samuel wrote:
>Paul DuBois wrote:
>
>> mysql_pconnect() can decrease the time needed to connect to the
>> server, relative to mysql_connect() -- but how can mysql_pconnect()
>> speed up an INSERT statement?
>
>They can't directly. But there are three ways:
>
>connect + 1 insert
>connect + 2 inserts
>connect + many inserts.
>
>
>In case 1 pconnect will speed up everything by factor of two. If you
>want speed, this it's not important where you get it. Most people who
>asking about have case 1.
>
>Second case is same
Okay, but don't you really mean that mysql_pconnect() speeds up
your server session, not that it speeds up inserts?
>In third case it's a good idea to have everything encapsualted between
>LOCK TABLES. Of course this depends.
Since we're talking about PHP functions, and therefore probably about
using MySQL in a Web context, is this a good idea? It locks out other
clients for the duration of your inserting.
--
Paul DuBois, paul@stripped