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.
This commit is contained in:
Nicolas Bouilleaud 2019-09-20 15:47:01 +02:00 committed by simon lehericey
parent 1505d45be1
commit 780e157190
2 changed files with 11 additions and 1 deletions

View file

@ -0,0 +1,7 @@
class AddIndexesToDossier < ActiveRecord::Migration[5.2]
def change
add_index :dossiers, :state
add_index :dossiers, :archived
add_index :follows, :unfollowed_at
end
end