PERF: add index to make finding new topics faster
This commit is contained in:
parent
669247f16f
commit
20bee937b7
|
@ -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
|
Loading…
Reference in New Issue