List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:April 6 2001 4:22pm
Subject:Re: Mysql speed :)
View as plain text  
On Fri, Apr 06, 2001 at 08:41:32AM -0700, William R. Mussatto wrote:
> How do you get it not to try an quote numbers?  I realize this should be 
> obvious, but I can't find an exampl in the msql/mysql book.

Wrong book.  Tim's book says how to do this on p. 124. :-)

But why does it matter?  MySQL will convert the strings to numbers
anyway.

> 
> On Fri, 6 Apr 2001, Tim Bunce wrote:
> 
> > Date: Fri, 6 Apr 2001 11:00:57 +0100
> > From: Tim Bunce <Tim.Bunce@stripped>
> > To: Heikki Tuuri <Heikki.Tuuri@stripped>
> > Cc: pz@stripped, mysql@stripped
> > Subject: Re: Mysql speed :)
> > 
> > On Thu, Apr 05, 2001 at 07:50:24PM +0300, Heikki Tuuri wrote:
> > > 
> > > for ($j = 0; $j < 100000; $j = $j + 1) {
> > > 
> > >        $dbh->do("insert into speed1 values ($j, $j, $j)");
> > > }
> > 
> > That would run faster if you do a prepare with placeholders outside
> > the loop and then just use $sth->execute($j, $j, $j) inside.
> > 
> > That would save you the DBI statement handle creation/destruction
> > overhead that you're paying for each insert when using do().
> > 
> > Tim.
> 
> Sincerely,
> 
> William Mussatto, Senior Systems Engineer
> CyberStrategies, Inc
> ph. 909-920-9154 ext. 27
Thread
Mysql speed :)Peter Zaitsev5 Apr
  • Re: Mysql speed :)Sinisa Milivojevic5 Apr
Re: Mysql speed :)Richard Ellerbrock5 Apr
Re: Mysql speed :)Heikki Tuuri5 Apr
  • Re: Mysql speed :)Tim Bunce6 Apr
    • RE: Mysql speed :)Martin Hubert6 Apr
      • Re: Mysql speed :)Tim Bunce6 Apr
    • Re: Mysql speed :)William R. Mussatto6 Apr
      • Re: Mysql speed :)Paul DuBois6 Apr
      • Re: Mysql speed :)Tim Bunce6 Apr
        • Re: Mysql speed :)William R. Mussatto6 Apr
    • Re: Mysql speed :)Vivek Khera6 Apr
      • Re: Mysql speed :)Christian Jaeger7 Apr
  • Re: Mysql speed :)Sinisa Milivojevic6 Apr
Re: Mysql speed :)Sinisa Milivojevic6 Apr
RE: Mysql speed :)Gregert Johnson6 Apr
  • Re: Mysql speed :)Tim Bunce6 Apr
RE: Mysql speed :)Gregert Johnson6 Apr