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

feat(migrations): Add new index to IncidentTrigger model #58467

Merged
merged 3 commits into from
Oct 20, 2023

Conversation

isabellaenriquez
Copy link
Member

@isabellaenriquez isabellaenriquez commented Oct 19, 2023

This PR adds a new index to IncidentTrigger to make querying for the metric alert rate limiting feature more efficient #58032.

Query in question

@isabellaenriquez isabellaenriquez requested review from a team as code owners October 19, 2023 19:44
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 19, 2023
@isabellaenriquez isabellaenriquez changed the title feat(migrations): Create new index to IncidentTrigger model feat(migrations): Add new index to IncidentTrigger model Oct 19, 2023
@github-actions
Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/migrations/0578_add_index_on_incident_trigger_alert_ratelimit.py ()

--
-- Alter index_together for incidenttrigger (1 constraint(s))
--
CREATE INDEX CONCURRENTLY "sentry_incidenttrigger_alert_rule_trigger_id_in_e98fd1e3_idx" ON "sentry_incidenttrigger" ("alert_rule_trigger_id", "incident_id");

@github-actions
Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/migrations/0579_index_incident_trigger.py ()

--
-- Alter index_together for incidenttrigger (1 constraint(s))
--
CREATE INDEX CONCURRENTLY "sentry_incidenttrigger_alert_rule_trigger_id_in_e98fd1e3_idx" ON "sentry_incidenttrigger" ("alert_rule_trigger_id", "incident_id");

@isabellaenriquez isabellaenriquez merged commit 2d489b9 into master Oct 20, 2023
50 checks passed
@isabellaenriquez isabellaenriquez deleted the isabella/add-index-incidenttrigger branch October 20, 2023 16:15
@github-actions github-actions bot locked and limited conversation to collaborators Nov 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants