Skip to main content

CREATE_OUTBOX_PENDING_INDEX

Constant CREATE_OUTBOX_PENDING_INDEX 

Source
pub const CREATE_OUTBOX_PENDING_INDEX: &str = "
CREATE INDEX IF NOT EXISTS idx_outbox_pending
ON outbox (status, visible_after)
WHERE status = 'pending'";
Expand description

Partial index over claimable rows, supporting the dispatcher’s status='pending' claim scan ordered by visible_after. Restricting the index to pending rows keeps it small as completed rows accumulate.