title: Query is slow when joining table from DB links
body: <p>To be honest I am not sure if this is because of joining tables with DB links.</p>
  
  <p>Here is my query:</p>
  
  <pre><code>SELECT
  DISTINCT
  AA.NAME,
  DD.TOURNAMENT_TIME, 
  BB.CLUB_TYPE 
  FROM
  ROOT.test_adviser@123test.com CC
  INNER JOIN 
  ROOT.test_club@123test.com BB
  ON BB.adviser_id = CC.adviser_id
  INNER JOIN ROOT.test_student@123test.com AA
  ON AA.student_id = BB.student_id
  INNER JOIN test_tournament DD
  ON DD.tournament_id = AA.tournament_id AND DD.slot_number = BB.slot_number
  </code></pre>
  
  <p>Query above runs over 20 minutes. If this is due to using <strong>JOIN</strong> inefficiently any idea how I could clean the query? Any help is greatly appreciated.</p>
  
  <p><strong>Other information</strong> </p>
  
  <blockquote>
    <p>Table DD - has 7 rows ( This is the count I hope to return with the
    columns from other tables joined)</p>
    
    <p>Table AA, CC, BB - has more than 60k rows.</p>
  </blockquote>