title: Improve query performance for a large join
body: <p>I am trying to get a list of users who did a pull request on any repos with a specified language.</p>
  
  <pre><code>SELECT distinct(actor_id) as id FROM pull_requests 
  JOIN (SELECT id FROM repos WHERE language = 'javascript') as res 
    ON pull_requests.repo_id = res.id
  </code></pre>
  
  <p>I've been trying to improve the performance of this query. Currently it takes 2sec+ to run.</p>