MYSQL: Update replace on 2million records -


ok have on 2 million phone numbers in 1 table , need remove spaces phone field.

i have index phone field , optimised table still when run following query slow , takes forever - in fact still waiting , 30minutes have past

update actnsw set phone = replace(phone, ' ', ''); 

i need know if there away speed process not take long.

database scheeme using innodb server version: 5.5.31-1 (debian)

this basic sql query . can't can 1 thing don't run update
query whole table . make multiple update queries ..

update actnsw set phone = replace(phone, ' ', '') id < .2 milian update actnsw set phone = replace(phone, ' ', '') id < .4 milian , id > .2 milian update actnsw set phone = replace(phone, ' ', '') id > .5 milian , id > .4 milian .... 

i think .


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -