feat: add index to conversation id and account_id (#6757)

- This PR adds an index to conversations id and account_id. This improves the performance of some reports query
This commit is contained in:
Shivam Mishra
2023-03-28 22:34:04 +05:30
committed by GitHub
parent 54a809ea54
commit bc8e8f3bb5
6 changed files with 27 additions and 1 deletions

View File

@@ -0,0 +1,7 @@
class AddIndexToConversationsAccountIdAndId < ActiveRecord::Migration[6.1]
disable_ddl_transaction!
def change
add_index :conversations, [:account_id, :id], name: 'index_conversations_on_id_and_account_id', algorithm: :concurrently
end
end