List:General Discussion« Previous MessageNext Message »
From:Jeremy Zawodny Date:June 1 2002 6:35am
Subject:Re: I need 50.000 inserts / second
View as plain text  
On Fri, May 31, 2002 at 01:56:12PM -0500, Dan Nelson wrote:
> In the last episode (May 31), Mark said:
> > Cesar, you really should consider using placeholders and bind_param
> > (if available). Without using placeholders, the insert statement will
> > contain the literal values to be inserted and has to be re-prepared
> > and re-executed for each row. With placeholders, the insert statement
> > only needs to be prepared once. The bind values for each row can be
> > given to the execute method each time it's called. By avoiding the
> > need to re-prepare the statement for each row, the application
> > typically runs many times faster.
> 
> Mysql does not support bindings or preparing.  Each statement is
> fully parsed.  Whatever you think perl is doing, it isn't :)

Correct, but...

1. When the MySQL protocol does support binding, then applications
   coded to use them will suddenly speed up.

2. Using bind parameters and prepared statements with Perl requires
   less overhead and makes the Perl code faster.

Jeremy
-- 
Jeremy D. Zawodny, <jzawodn@stripped>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.51: up 2 days, processed 55,486,250 queries (282/sec. avg)
Thread
I need 50.000 inserts / secondCesar Mello - Axi31 May
  • Re: I need 50.000 inserts / secondJeremy Zawodny31 May
  • Re: I need 50.000 inserts / secondSteve Edberg31 May
  • Re: I need 50.000 inserts / secondHarald Fuchs31 May
  • Re: I need 50.000 inserts / secondMark31 May
    • Re: I need 50.000 inserts / secondBenjamin Pflugmann31 May
    • Re: I need 50.000 inserts / secondDan Nelson31 May
      • Re: I need 50.000 inserts / secondJeremy Zawodny1 Jun
  • Re: I need 50.000 inserts / secondMark31 May
  • Re: I need 50.000 inserts / secondCesar Mello - Axi31 May
    • Re: I need 50.000 inserts / secondmos2 Jun
  • Re: I need 50.000 inserts / secondRichard Clarke2 Jun
RE: I need 50.000 inserts / seconddomi31 May
  • Re: I need 50.000 inserts / secondCesar Mello - Axi31 May
    • Re: I need 50.000 inserts / secondT├Ánu Samuel31 May
    • Re: I need 50.000 inserts / secondBrent Baisley31 May