List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:July 30 1999 9:01pm
Subject:Re: performance question
View as plain text  
>>>>> "Paul" == Paul DuBois <paul@stripped> writes:

Paul> 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

Paul> Okay, but don't you really mean that mysql_pconnect() speeds up
Paul> 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.

Paul> Since we're talking about PHP functions, and therefore probably about
Paul> using MySQL in a Web context, is this a good idea?  It locks out other
Paul> clients for the duration of your inserting.

One way to get more insert speed is to let the client pile up
insert statements and then do a multi-row insert to insert many rows
with one statement.

Regards,
Monty
Thread
Count(*) make a WRITE lock?Steven Roussey16 Jul
  • performance questionPaul Schwarzl16 Jul
    • Re: performance questionTõnu Samuel16 Jul
      • Re: performance questionPaul DuBois17 Jul
    • performance questionsinisa16 Jul
    • Re: performance questionTõnu Samuel17 Jul
      • Re: performance questionPaul DuBois17 Jul
        • Re: performance questionMichael Widenius31 Jul
  • Count(*) make a WRITE lock?sinisa16 Jul
    • RE: Count(*) make a WRITE lock?Steven Roussey18 Jul
      • RE: Count(*) make a WRITE lock?sinisa18 Jul
      • RE: Count(*) make a WRITE lock?Michael Widenius30 Jul