Add indexes on user+id to changeset and diary comments
This commit is contained in:
parent
bd577d7c92
commit
ebe7cf8d17
4 changed files with 25 additions and 0 deletions
8
db/migrate/20250121191749_add_user_comment_indexes.rb
Normal file
8
db/migrate/20250121191749_add_user_comment_indexes.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
class AddUserCommentIndexes < ActiveRecord::Migration[7.2]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
add_index :changeset_comments, [:author_id, :id], :algorithm => :concurrently
|
||||
add_index :diary_comments, [:user_id, :id], :algorithm => :concurrently
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue