title: Optimizing a MySQL query (Update + subquery)
body: <p>I want to change the values of column <strong>this</strong> in <strong>table_one</strong> where <strong>this</strong> = 1 and <strong>id</strong> value of that row exists anywhere in <strong>table_two</strong>'s column <strong>other_id</strong></p>
  
  <p>So I'm using this query:</p>
  
  <pre><code>UPDATE table_one SET this='0' WHERE this='1' AND table_one.id IN (SELECT other_id FROM table_two);
  </code></pre>
  
  <p>The query took several hours without yet finishing, so I was wondering if there is a way to accomplish it faster.</p>
  
  <p>Both <strong>table_one.id</strong> and <strong>table_two.other_id</strong> have unique values if that matters.</p>
  
  <p><strong>table_one</strong> has 550k rows</p>
  
  <p><strong>table_two</strong> has 30k rows</p>
  
  <p>MySQL 5.0.22</p>