title: Improve performance of Rails application by adding indexes?
body: <p>In my Rails application I have an index view that lists all of my <code>projects</code>.</p>
  
  <p>This list can be sorted by clicking on any of the table column headers, e.g. <code>Date</code>, <code>Name</code>, <code>updated_at</code> etc. This happens by appending a <code>&amp;sort=</code> GET parameter to the URL.</p>
  
  <p>My question is: From a performance point-of-view, would it be advisable to add indexes to these columns in my database?</p>
  
  <p>This is what a migration might look like:</p>
  
  <pre><code>class AddMoreIndexes &lt; ActiveRecord::Migration
    def change
      add_index :projects, :date
      add_index :projects, :name
      add_index :projects, :update_at
    end
  end
  </code></pre>
  
  <p>Will I get any performance gains from this?</p>