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.

It's magic. Or specifically it relies on Perl's internal magic.
Plus, of course, it wouldn't actually matter if it did in this case
since mysqld will happily convert the strings to numbers anyway.

Tim.

> On Fri, 6 Apr 2001, Tim Bunce wrote:
> 
> > Date: Fri, 6 Apr 2001 11:00:57 +0100
> > From: Tim Bunce <[EMAIL PROTECTED]>
> > To: Heikki Tuuri <[EMAIL PROTECTED]>
> > Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
> > 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.
> > 
> > ---------------------------------------------------------------------
> > Before posting, please check:
> >    http://www.mysql.com/manual.php   (the manual)
> >    http://lists.mysql.com/           (the list archive)
> > 
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> > 
> 
> Sincerely,
> 
> William Mussatto, Senior Systems Engineer
> CyberStrategies, Inc
> ph. 909-920-9154 ext. 27

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to