On Fri, 22 Jun 2001 11:28:19 -0500, "Cal Evans" <[EMAIL PROTECTED]>   wrote:


If your using Perl w/DBI, you may want to check out the use of place holders and
bind_columns. Create your create your insert statement outside the loop, then do
the execute() within the loop using placeholders or bind_columns. I just did
something very similar this morning, we did about 5500 inserts/updates in less
then 2secs!


>>It is my understanding that the first syntax is faster in mysql.
>>
>>Cal
>>*
>>* Cal Evans
>>* Senior Internet Dreamer
>>* http://www.calevans.com
>>*
>>----- Original Message -----
>>From: "Dvořáček Michal" <[EMAIL PROTECTED]>
>>To: <[EMAIL PROTECTED]>
>>Sent: Friday, June 22, 2001 11:48 AM
>>Subject: insert
>>
>>
>>> Hi,
>>>
>>> is better to create insert query for better performance this way:
>>> INSERT INTO table VALUES(val1, val2, val3), (val4, val5, val6), (...);
>>> or in this way:
>>> for (i = 0; i < 3000; i++) {
>>>   INSERT INTO table VALUES(val[i][1], val[i][2], val[i][2]);
>>> }
>>>
>>>
>>>
>>>    Michal Dvoracek                           [EMAIL PROTECTED]
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>>
>>>
>>
>>
>>---------------------------------------------------------------------
>>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

Mike(mickalo)Blezien
========================================
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225) 686-2002
=========================================
















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