title: update join table taking a very long time
body: <p>I have a table <code>citations</code> with 5 million rows with following info:</p>
  
  <pre><code>Paperkey1 | Year1 | Paperkey2 | Year2 
  100                   20
  200                   90
  300                   80
  </code></pre>
  
  <p>And another table <code>pub_year</code> with around 3 million rows with following info:</p>
  
  <pre><code>Paperkey | Year
  100        2001
  200        2002
  20         2003
  90         2004
  80         2005
  </code></pre>
  
  <p>I want to update the table <code>citations</code> by taking the year value from table <code>pub_year</code>. I used the following query but its been running for more than 3 hours and still its not finished yet. </p>
  
  <pre><code>update citations T2
  
  join pub_year T1 on T2.paperkey1= T1.paperkey
  
  set T2.year1 = T1.year;
  </code></pre>
  
  <p>Is there anybody who knows what are the main reason that its taking too long? Im not sure if it ever finish if i keep letting it runs. Or is there something wrong with my query? 
  The paperkey fields are all in varchar and the year fields are all in integer. Thank you.</p>
  
  <p>Here is the update after running EXPLAIN:</p>
  
  <p><img src="https://i.stack.imgur.com/WfGts.png" alt="enter image description here"></p>