2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

optimise view count calculation query

This commit is contained in:
Sam 2013-10-02 17:08:53 +10:00
parent ee286cc270
commit 441010ac65
2 changed files with 13 additions and 5 deletions

View file

@ -0,0 +1,5 @@
class AddUserIdParentTypeIndexOnViews < ActiveRecord::Migration
def change
add_index :views, [:user_id,:parent_type,:parent_id]
end
end