Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PERF: add missing bounce_key index to email_logs
We perform lookups based off bounce_key when emails bounce, we need the index.
- Loading branch information
bb8cdf9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to add the index before running the
DELETE
query. The delete query scans throughbounce_key
and without the index it is taking forever for me locally.bb8cdf9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll just assume no dupes then, this is simpler and odds of dupes here are pretty much zero.
bb8cdf9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O right it is an unique index so we can't add it before the delete query.
bb8cdf9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://review.discourse.org/t/dev-follow-up-on-bb8cdf9e-assume-no-dupe-bounce-keys/3203