MySQL Forums
Forum List  »  PHP

Re: Update more than 30,000 records row by row
Posted by: Yogesh Mahadnac
Date: June 09, 2011 11:18AM

Hello Rick,

Many thanks for your reply.

Indeed, I was thinking about the following:

1. Selecting all the rows from my main table

2. Do all the processing via PHP - I'm using PHP because the web application has been created using PHP as the main scripting language, but yes, I would be open to using other alternatives e.g. Perl - except that I don't know Perl at the moment, but wouldn't mind learning it :-)

3. Inserting everything into a separate table

4. Calling a Stored Procedure to perform the update (at database level, I guess this would be really very quick, isn't it?).

But, yes, I would definitely consider dumping everything into a csv (hope it can hold 34,000 records without any problem!), use LOAD DATA to insert those records into a separate table, and then use my Stored Procedure to do all the updates from table2 to my main table.

Thanks again for your recommendations.

I'll keep you posted as soon as I give it a try ;-)

Best regards,
Yogesh.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.