title: Are you in favour of in-memory filtering or using SQL queries on large number of records in a ruby on rails app?
body: <p>I'm writing a rails finder query that pulls out records for articles sorted by the highest numbers of <em>approved and public</em> comments per article.</p>
  
  <p>Which is the best way to run such a query in Ruby on Rails?</p>
  
  <p>As a general rule, are developers in favour of in-memory filtering or running complex SQL queries?</p>