demarches-normaliennes/db/migrate/20190920122228_add_indexes_to_dossier.rb
Nicolas Bouilleaud 780e157190 Add indexes to Dossier.state, Dossier.archived, Follow.unfollowed_at
We make a ton of queries on these attributes (for example in /procedures#index and /procedures#show). I think it should help.
2019-09-25 14:10:00 +02:00

7 lines
186 B
Ruby

class AddIndexesToDossier < ActiveRecord::Migration[5.2]
def change
add_index :dossiers, :state
add_index :dossiers, :archived
add_index :follows, :unfollowed_at
end
end