We are receiving a spike of HIBP callback requests which look up our subscribers by sha1 hash. The RDS node is maxing on CPU. :( Adding an index to the sha1 column should help this. create index on subscribers (sha1);
Index created in stage, please verify.
(In reply to Bob Micheletto [:bobm] from comment #1) > Index created in stage, please verify. Verification done by :groovecoder via IRC: groovecoder> bobm: stage DB good - works for subscribing, verifying, and notifying Production index has been added.
Note: I've created a PR to retro-actively add a migration for this DB change to our code-base for future environments. But since the index already exists in stage & prod, we should run this SQL to "fake" the migration that records this DB change: INSERT INTO knex_migrations (name, batch, migration_time) values ('20181007085241_add_sha1_index.js', 4, '2018-10-07 08:52:42.000-05');  https://github.com/mozilla/blurts-server/pull/520
Closing this bug.
Status: NEW → RESOLVED
Last Resolved: 7 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.