I need replace string1 to string2 in column big tabe. My table weight 1.7GB. For update I will be use: UPDATE table SET column = REPLACE( column, 'search', 'replace' ) ;

So, I have several questions:

  1. Will table lock during procedure? Should I hide public part my site or not?
  2. How long time this procedure can executing?
  3. How better run this? Maybe 'screen'? if my ssh connection will closed.

Mysql 5.5.53

  • Regarding your first question: Which storage engine are you using? I ask because with the LOW_PRIORITY modifier, execution of the UPDATE is delayed until no other clients are reading from the table. This affects only storage engines that use only table-level locking (such as MyISAM, MEMORY, and MERGE). Jun 19, 2017 at 14:21

1 Answer 1


See http://mysql.rjweb.org/doc.php/deletebig#deleting_in_chunks for a technique of chunking a table. It is aimed at DELETE, but can easily be adapted to UPDATE.

This should avoid the timeouts and hangs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.