PERF: add index to make finding new topics faster

This commit is contained in:
Sam 2015-03-02 09:49:20 +11:00
parent 669247f16f
commit 20bee937b7

View file

@ -0,0 +1,6 @@
class CreateSuggestedForIndex < ActiveRecord::Migration
def change
add_index :topics, [:created_at, :visible],
where: "deleted_at IS NULL AND archetype <> 'private_message'"
end
end