Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index "twilio_sms_delivery_details.session_id" #1277

Merged
merged 4 commits into from
Sep 2, 2020

Conversation

harimohanraj89
Copy link
Contributor

@harimohanraj89 harimohanraj89 commented Sep 2, 2020

Story card: https://app.clubhouse.io/simpledotorg/story/1138/add-an-index-to-twilio-sms-delivery-details-table

Because

We have DB and request strain when we fire off reminders and get callbacks from Twilio. We spend most of our time finding the right TwilioSmsDeliveryDetail record by session ID.

This addresses

This PR indexes that session_id column for quick finds.

Note: Do we need to run this thing concurrently? Can someone help me verify against a prod-like dataset? ie, how long will this migration take to run in IHCI production?

@harimohanraj89 harimohanraj89 temporarily deployed to simple-review-pr-1277 September 2, 2020 07:48 Inactive
db/schema.rb Outdated Show resolved Hide resolved
db/schema.rb Outdated Show resolved Hide resolved
@harimohanraj89 harimohanraj89 temporarily deployed to simple-review-pr-1277 September 2, 2020 08:24 Inactive
@harimohanraj89 harimohanraj89 temporarily deployed to simple-review-pr-1277 September 2, 2020 08:47 Inactive
@harimohanraj89 harimohanraj89 temporarily deployed to simple-review-pr-1277 September 2, 2020 09:55 Inactive
@harimohanraj89 harimohanraj89 merged commit 98a4d06 into master Sep 2, 2020
@harimohanraj89 harimohanraj89 deleted the add-index-for-sms-details branch September 2, 2020 10:08
harimohanraj89 pushed a commit that referenced this pull request Sep 3, 2020
…1285)

The second git tag here will always fail, because we have already
created the tag as an annotated tag. This causes the script to bail out with an error:

```
[~/src/simpledotorg/simple-server (master)]> bin/release
CHANGELOG
---------
• Lower the explain threshold for New Relic to 0.25 (#1284)
• Add index to rx drugs (#1283)
• Allow Admins to Edit accesses (#1252)
• Migrate the Admin::UsersController and its actions (#1280)
• Index "twilio_sms_delivery_details.session_id" (#1277)
• Inline-ify the clashing function (#1279)
• More efficient strategy for inviting new admins (#1263)
• More efficient tree for displaying access resources (#1262)
• Permissions: flesh out roles and actions (#1208)
Creating release release-2020-09-02-1. Continue? (y/N):
y
fatal: tag 'release-2020-09-02-1' already exists
```

I'm also adding the #releases channel to the final help message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants