Postgres advisor flagged seq-scans and redundant indexes across both backends (D1 + Postgres): - add projects(organization_id) — org-scoped project listings seq-scanned - add account(account_id, provider_id) — better-auth sign-in lookup - add verification(expires_at) — expired-token cleanup range scan - drop saved_keyword_tag_assignments_keyword_idx — covered by unique (saved_keyword_id, tag_id) prefix - drop rank_snapshots_run_idx — covered by unique (run_id, tracking_keyword_id, device) prefix Mirrored in both schema dialects + parity-test required-index guard.
2 lines
116 B
SQL
2 lines
116 B
SQL
DROP INDEX "rank_snapshots_run_idx";--> statement-breakpoint
|
|
DROP INDEX "saved_keyword_tag_assignments_keyword_idx"; |