CREATE INDEX outbox_events_published_at_idx ON outbox_events (published_at, id) WHERE published_at IS NOT NULL;