![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Web Programming, Web 2.0 and Mashups Discuss Web Programming and Web Server Administration, including LAMP, Apache, MySQL, Flash, HTML, SEO, Mashups and other Web APIs and topics. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to delete duplicate rows based on last column | reva | Shell Programming and Scripting | 16 | 09-01-2009 09:12 AM |
| column to rows based on another column... | malcomex999 | Shell Programming and Scripting | 5 | 07-08-2009 06:28 AM |
| convert rows into column | cdfd123 | Shell Programming and Scripting | 3 | 01-11-2008 12:54 PM |
| splitting a column into rows | spindoctor | UNIX for Dummies Questions & Answers | 3 | 07-24-2007 03:25 PM |
| Factorize some rows in a column | frebo | UNIX for Dummies Questions & Answers | 5 | 03-21-2006 06:41 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Mysql question: Best way to update a column containing 8 million rows
Hi all,
I was wondering if anyone knew a good/safe way to update a single column in a table that could contain upto 8 million rows... simple command like: UPDATE set blah=foo where bar=XXX; I will be running this on tables being written to and tables that have already been created. ---------- Post updated at 03:38 PM ---------- Previous update was at 06:54 AM ---------- no one have a way? the only one i can think of is limiting the UPDATE and do it in batches? |
|
||||
|
Hi.
Sorry, I'm not so familiar with mySQL, but as you didn't get an answer yet! This is based on Oracle, but the same ideas should relate. Firstly it's safe to update a table with however many rows. The worst that could happen is that the update fails and the uncommitted changes are rolled back. You could:
Last edited by scottn; 09-30-2009 at 06:48 PM.. |
|
||||
|
Quote:
I think I am going down the road of creating a script to run in the background (as a cron task) and commit every X thousand records. I just didn't want to run the update all in one go as this would impact performance and increase logs made. |
|
||||
|
Mysql and a billion rows using innodb
read more [b]Mysql and a billion rows using innodb - dslreports.com Last edited by vbe; 6 Days Ago at 09:56 AM.. Reason: rm URL |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|