Skip to content

perf(cleanup): scan unused commits in date_added order - #130869

Open
ldelvoye wants to merge 1 commit into
ldelvoye/feat/commit-date-added-indexfrom
ldelvoye/feat/commit-cleanup-date-order
Open

ldelvoye wants to merge 1 commit into
ldelvoye/feat/commit-date-added-indexfrom
ldelvoye/feat/commit-cleanup-date-order

Conversation

@ldelvoye

Copy link
Copy Markdown
Member

resolves INFRENG-1014

Orders the Commit cleanup scan by date_added, so it pages on (date_added, id) through the index from #130862 instead of walking the whole table by id.

Don't merge until #130862's post-deployment migration has run in every region: without the index, ordering by date is slower than today.

Ordering by id walks the whole table to find rows past the cutoff.
Ordering by date_added pages on (date_added, id), which the new
sentry_commit index range-scans directly.
@linear-code

linear-code Bot commented Nov 12, 2026

Copy link
Copy Markdown

INFRENG-1014

@ldelvoye
ldelvoye added this pull request to stack #130870 November 12, 2026 00:52
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 12, 2026
@ldelvoye
ldelvoye marked this pull request as ready for review November 12, 2026 00:55

This branch has not been deployed

No deployments
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.

1 participant