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:
parent
ee286cc270
commit
441010ac65
2 changed files with 13 additions and 5 deletions
|
@ -0,0 +1,5 @@
|
|||
class AddUserIdParentTypeIndexOnViews < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :views, [:user_id,:parent_type,:parent_id]
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue