mirror of
https://github.com/discourse/discourse.git
synced 2025-04-11 02:10:47 +08:00
PERF: Tune indexes to speed up lookup for bounced email.
This commit is contained in:
parent
2a98907346
commit
09a00016ad
12
db/migrate/20180719103905_alter_indexes_on_email_logs.rb
Normal file
12
db/migrate/20180719103905_alter_indexes_on_email_logs.rb
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
class AlterIndexesOnEmailLogs < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
remove_index :email_logs,
|
||||||
|
name: "index_email_logs_on_user_id_and_created_at",
|
||||||
|
column: [:user_id, :created_at]
|
||||||
|
|
||||||
|
add_index :email_logs, :user_id
|
||||||
|
|
||||||
|
remove_index :email_logs, [:skipped, :created_at]
|
||||||
|
add_index :email_logs, [:skipped, :bounced, :created_at]
|
||||||
|
end
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user