Skip to content

chore(db): Drop unsed index on last_seen column in GroupRelease table #91611

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

Merged
merged 1 commit into from
May 14, 2025

Conversation

vgrozdanic
Copy link
Member

Similar as in #91610, index on last_seen column hasn't been used since Oct 29th (since then we track the usage), and it takes 674GiB of disk in our main US DB.

I went through our codebase and couldn't find any query that would still be using this index. On our main US DB (and some other single tenants) this will be executed by an SRE, since dropping the index will likely timeout, even as a post deployment migration. For other regions, this index is small enough to be removed as a post deployment migration

@vgrozdanic vgrozdanic requested a review from beezz May 14, 2025 09:18
@vgrozdanic vgrozdanic requested review from a team as code owners May 14, 2025 09:18
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label May 14, 2025
Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/migrations/0890_remove_index_on_group_release_last_seen.py

for 0890_remove_index_on_group_release_last_seen in sentry

--
-- Alter field last_seen on grouprelease
--
DROP INDEX CONCURRENTLY IF EXISTS "sentry_grouprelease_last_seen_aff155f8";

@vgrozdanic vgrozdanic merged commit eff0535 into master May 14, 2025
61 checks passed
@vgrozdanic vgrozdanic deleted the vgrozdanic/drop-index-on-group-release-last-seen branch May 14, 2025 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants