MySQL Forums :: PHP :: Update more than 30,000 records row by row


Advanced Search

Update more than 30,000 records row by row
Posted by: Yogesh Mahadnac ()
Date: June 09, 2011 05:32AM

Hello,

I currently have to launch an update of more than 30,000 records, row by row, on my MySQL database. I'm using PHP as the scripting language.

Actually, the person who has created the module I'm currently re-engineered has stored all the values as 1 text field (with a ¦ separator between fields). Yes, you read correctly! Everything is in 1 field, instead of date being in a datefield, time in a timefield, address in a varchar or text, numeric data in a numeric field, etc (that sucks, I know!) - and I was told that it was done by a top-class programmer! lol... top-class nut who doesn't even know the basics of proper database administration, yea! ;-)

And now, I need to split this text field into each individual (and appropriate) field and then run a script to backdate all those records, line by line (there are no distinct values unfortunately - i've tried select distinct theFieldName from myTable, and it returns 34,000 records).

I've already created the PHP script, tested with 10 records (as dummy), works like a charm!

But now, I need to find a way to update the whole bulk of data in the database.

The problem is, if I launch my PHP script on the browser, it times out after some time.

So, I need to find a way to perform such big updates effectively (maybe at database level?)

Grateful if you could please advise on the above at your earliest convenience.

Regards,
Yogesh.

Options: ReplyQuote


Subject Written By Posted
Update more than 30,000 records row by row Yogesh Mahadnac 06/09/2011 05:32AM
Re: Update more than 30,000 records row by row laptop alias 06/09/2011 06:08AM
Re: Update more than 30,000 records row by row Yogesh Mahadnac 06/09/2011 11:03AM
Re: Update more than 30,000 records row by row Rick James 06/09/2011 10:56AM
Re: Update more than 30,000 records row by row Yogesh Mahadnac 06/09/2011 11:18AM
Re: Update more than 30,000 records row by row Rick James 06/09/2011 08:33PM
Re: Update more than 30,000 records row by row Yogesh Mahadnac 06/09/2011 10:43PM
Re: Update more than 30,000 records row by row Rick James 06/10/2011 09:54AM
Re: Update more than 30,000 records row by row Yogesh Mahadnac 06/12/2011 11:36PM
Re: Update more than 30,000 records row by row Rick James 06/13/2011 10:45AM
Re: Update more than 30,000 records row by row Yogesh Mahadnac 06/13/2011 11:28PM
Re: Update more than 30,000 records row by row adam island 06/10/2011 12:54PM


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.