mirror of
https://github.com/discourse/discourse.git
synced 2026-07-29 23:58:12 -05:00
PERF: reverse index on topic users to speed up join
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
class CreateTopicUserIndex < ActiveRecord::Migration
|
||||
def change
|
||||
# seems to be the most effective for joining into topics
|
||||
add_index :topic_users, [:user_id, :topic_id], unique: true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user