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

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -