optimization - speed up an update join query in mysql -


i have 2 tables each of 1 hundred million rows, key1 , str_key both non-unique keys. following mysql query, according show engine innodb status, performing around 80 reads/sec, no updates yet. no other query running.

  update table_r r, table_w w set r.key1=0 r.str_key=w.str_key 
  1. is correct query take 100 million / 60 > 1 million seconds finish?
  2. how optimize query finish quickly?

whenever query slow, first thing make sure have index on columns mentioned in clause.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Socket.connect doesn't throw exception in Android -

SPSS keyboard combination alters encoding -