chore: Add indexes to improve reporting performance (#9478)
- Adding a new index on (account_id,created_at,message_type) based on our performance improvement exercise. This index significantly improves the page load speeds of messaging reports.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class AddIndexForMessageTypeAccountDate < ActiveRecord::Migration[7.0]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
add_index :messages, [:account_id, :created_at, :message_type], name: 'index_messages_on_account_created_type', algorithm: :concurrently
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user