Skip to content

perf(db): drop duplicate reward disbursement index#909

Open
raymondjacobson wants to merge 1 commit into
mainfrom
codex/db-audit-drop-duplicate-reward-disbursement-index
Open

perf(db): drop duplicate reward disbursement index#909
raymondjacobson wants to merge 1 commit into
mainfrom
codex/db-audit-drop-duplicate-reward-disbursement-index

Conversation

@raymondjacobson
Copy link
Copy Markdown
Member

Summary

  • drops sol_reward_disbursements_challenge_specifier_idx concurrently when present
  • keeps sol_reward_disbursements_challenge_idx, which has the same (challenge_id, specifier) key

Production evidence

  • the database audit found sol_reward_disbursements_challenge_specifier_idx duplicating the checked-in sol_reward_disbursements_challenge_idx
  • both indexes support the same challenge/specifier lookups, so keeping both adds write and vacuum overhead without improving read plans

Verification

  • migration review only; SQL is DROP INDEX CONCURRENTLY IF EXISTS
  • no application code changed

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.

1 participant