Context
Raised by Carmack in PR #1735 (round-1 review). Currently idx_tx_last_seen indexes (last_seen, id) for ALL transmissions; the only consumer (chunkedTxLastSeenBackfill) only ever scans WHERE last_seen=0.
Proposal
Replace with a partial index:
CREATE INDEX idx_tx_last_seen_zero ON transmissions(id) WHERE last_seen=0;
Why
- Index size shrinks to ~the count of unprocessed rows (typically 0 after backfill completes; bounded by ingest rate during normal ops).
- Once the backfill finishes, the partial index becomes near-empty and stops competing for cache.
Risk
- Requires
CREATE INDEX migration via RunAsyncMigration (the new index) + a follow-up DROP INDEX idx_tx_last_seen once the partial is built and verified. Two-step.
Context
Raised by Carmack in PR #1735 (round-1 review). Currently
idx_tx_last_seenindexes(last_seen, id)for ALL transmissions; the only consumer (chunkedTxLastSeenBackfill) only ever scansWHERE last_seen=0.Proposal
Replace with a partial index:
Why
Risk
CREATE INDEXmigration viaRunAsyncMigration(the new index) + a follow-upDROP INDEX idx_tx_last_seenonce the partial is built and verified. Two-step.