PERF: Add index to speed up `DirectoryItem.refresh_period!` query.
This commit is contained in:
parent
89f056203e
commit
66a0a89591
|
@ -0,0 +1,5 @@
|
|||
class AddIndexToTopicViewItems < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :topic_views, [:user_id, :viewed_at]
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue