title: Join multiple databases mysql
body: <p>I have roughly 2 Million records in two different databases, each has 1 million. I want to join the two tables with each other to find the differences but due to the data size the mysql throws a time-out error each time i perform the action. This is my query:</p>
  
  <pre><code>SELECT id FROM db1.table1 AS a INNER JOIN db2.table1 AS b ON ( b.Id != a.Id )
  </code></pre>
  
  <p>Any help would be appreciated !</p>