title: ActiveRecord db optimization: group by 2 columns count
body: <p>Currently I have a query that looks like this:</p>
  
  <pre><code>Model.group(:column1, :column2).count
  </code></pre>
  
  <p>Where both column1 and column2 are indexed. I've noticed that it gets pretty slow at scale. Would I get a performance gain by adding an index with both columns (ie <code>add_index :models, [:column1, :column2]</code>? If not, is there some other way to boost performance here?</p>